Open coastalwhite opened 2 months ago
It should be possible to create zero-width Arrays.
buy why?
I also ran into this when updating the reshape
implementation. NumPy allows Arrays with zero dimensions. When I asked Ritchie, he said to keep this constraint of size > 0 for now. But I guess ideally we would support this. Not really a bug though.
Just to note: if we do support this, the reshape
implementation can be updated to allow zero dimensions.
It should be possible to create zero-width Arrays.
buy why?
If we were to fully support the array counterpart of .list.concat
, I guess the length 0 array (acting as the identity) makes sense and will have its virtue for many application. We can do no-op for list counterpart with length 0 lists.
I also ran into this when updating the reshape implementation. NumPy allows Arrays with zero dimensions.
Checks
Reproducible example
This gives:
Log output
No response
Issue description
It is not possible to instantiate zero-width arrays
Expected behavior
It should be possible to create zero-width Arrays.
Installed versions