You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.
The non-ternary usage is equivalent to nonzero, e.g. np.where(array<1.) and (array < 1.).nonzero()
So that would be nice to also implement, as it is not currently present in JaggedArray. A (admittedly concise) workaround is array.index[array<1.]
defwhere(predicate, iftrue, iffalse):
predicate=predicate.astype(numpy.bool) # just to make sure they're 0/1returnpredicate*iftrue+ (1-predicate)*iffalse
numpy.where
is not a ufunc, but it's useful!The text was updated successfully, but these errors were encountered: