kmath
kmath copied to clipboard
Text representation
Override toString method for NDArray
I am not sure it is a good idea. Basically, toString()
is used only to identify tho object in debug mode, not to represent the result. In order to use it like python people use repr, one need to create a new presentation class and use it to render NDArray
. Is there ant specific way you want it to be done?
I don't have preferences, but this presenter must be smart.
Please elaborate on what do you mean by smart. I do not like the way python tries to do things under the carpet. I see two ways of doing this:
- Just use simple rendering functions like
NDArray.()->Unit
- Implement generic renderers which will take
Any
and render it according to its own features like it is done in currentDataForge
Output.
The second way is more smart
but I would not like it ti be in the KMath core, we will need separate module for that.
Basic functionality could be a part of #61