Open water5 opened 3 years ago
This is correct, but I don't see at the moment, where the problem is. I am afraid, it might have to do with how micropython
is implemented. I will look into this, though.
Ah, looks like I didn't read the spec properly for #280 :sweat_smile: I'll try to get a fix out by tomorrow.
@CallumJHays OK, thanks! I think you are right, one can catch this in the constructor function, or in ndarray_make_new
.
https://numpy.org/doc/stable/reference/generated/numpy.ndarray.html
Refer numpy.ndarray(shape), its parameter is shape, although arrays should be constructed using array(), arange(), zeros() ... and ulab.numpy support 2D array currently, but I think compatible numpy.ndarray() will be a good idea.
Currently:
ulab.numpy.ndarray((2, 2))
-> array([2.0, 2.0], dtype=float32)