Matthew Brett
2015-07-27 12:05:01 UTC
Hi,
`np.nonzero` for a 2D array `A` returns:
row_inds, col_inds = np.nonzero(A)
I notice that `row_inds` appears to be sorted by value, and `col_inds`
appears to be sorted by value, within each row.
Is this a guarantee of the `np.nonzero` function? If not, does this
function guarantee any property of the returned indices, other than
the correspondence of the row, column entries?
Cheers,
Matthew
`np.nonzero` for a 2D array `A` returns:
row_inds, col_inds = np.nonzero(A)
I notice that `row_inds` appears to be sorted by value, and `col_inds`
appears to be sorted by value, within each row.
Is this a guarantee of the `np.nonzero` function? If not, does this
function guarantee any property of the returned indices, other than
the correspondence of the row, column entries?
Cheers,
Matthew