Is there any reason why we cannot print the shape ...
# datascience
a
Is there any reason why we cannot print the shape directly ? From what I see it is represented as an IntArray in MultiK code base.
h
IntArray
is directly a
int[]
, which cannot be printed (java). I guess it’d make sense for the notebook to wrap such calls with
.toList()
to make it prettyprint.
i
Yes, we can add renderers for primitive arrays, thanks for mentioning
👍 6
s
there should be something called .contentToString
🤔 1
i
You can just call
array.toList().toString()
. Regarding renderer, I've added it.
a
@smallshen Thanks for the proposal. Yes it works but I think we shouldn't have to worry about a toList here. The first thing people coming from a Python Notebook experience will do is try to print the way I did. I think it's important to support these simple use cases to make a transition to kotlin notebook as easy as possible. Thanks for the responsiveness @Ilya Muradyan