Closed
Description
From the docs, I would expect nonzero
on a zero-dim array to return an empty tuple:
Returns a tuple of arrays, one for each dimension of a, containing the indices of the non-zero elements in that dimension.
Reproducing code example:
>>> np.array(5).ndim
0
>>> len(np.array(5).nonzero())
1
Metadata
Metadata
Assignees
Labels
No labels