> @lanking520 may be just printing the NDArray metadata in toString might be > suffient > `(x.shape, x.size, x.dtype, x.context)` > > * What is the use-case you are trying to solve with toString() ? > * I don't think you should threshold on maxLength in toArray(), it will be > confusing. there might be genuine cases where you want to move from > Off-Heap(NDArray) to JVM Heap(Array[Float])
Hi @nswamy , the point for `toString` method is to present something similar to what Python ndarray have. Usually when you print a python ndarray, it will give you an overview of the datastructure. The reason I set a limitation there is because I am facing this issue while I am trying to get a `toArray` result from a `1000000` element NDArray. It reported the error that JVM memory used up when we do this kind of operation. In that case, user should think of reducing the dimension, slicing the array or even write them into files. [ Full content available at: https://github.com/apache/incubator-mxnet/pull/12536 ] This message was relayed via gitbox.apache.org for [email protected]
