Array index out of bounds error despite seemingly valid value
Hi, I ran into this error when calling
ns.ones(2,1)(0)
Error msg:
java.lang.ArrayIndexOutOfBoundsException: 1 at org.nd4j.linalg.indexing.ShapeOffsetResolution.tryShortCircuit(ShapeOffsetResolution.java:82) at org.nd4j.linalg.indexing.ShapeOffsetResolution.exec(ShapeOffsetResolution.java:329) at org.nd4j.linalg.api.ndarray.BaseNDArray.get(BaseNDArray.java:4175) at botkop.numsca.Tensor.apply(Tensor.scala:120) at botkop.numsca.Tensor.apply(Tensor.scala:126) ... 28 elided
The expected output should be Tensor(1) since I'm taking the first slice row-wise.
Is this a limitation of the Tensor library, in that we are unable to work with shapes (x,1) ?
sorry for the extremely late response yes, that seems to a limitation imposed by nd4j perhaps this could be intercepted by numsca