Closed rainwoodman closed 7 years ago
However, the shape and strides are empty, no?
Yes.
They are empty. I also think of it this way. size = product(shape). the identity of product operator is 1. So if len(shape) == 0, the product shall be 1.
I fixed that and added some tests in 97f95d75a567d19338efca1b9033c919e07fb251
I just had to fix the specific case of empty array and did not notice that dimension 0 were used for scalars. I added tests to ensure correct behaviours.
We can index scalar array with array.get_value ({})
. I think it's good for now with the tests.
It is a scalar.