refactor discretize code

* boundedness option
* explicit bucketstrs array option (override all formatting)