Is there a shortcut version for finding the first (k) instance(s) of nonzero 
entries?
I'm thinking of Matlab's `find(X,k)`:
http://www.mathworks.com/help/matlab/ref/find.html
Easy enough to write of course.

I thought `flatnonzero` would be the obvious place for this,
but it does not have a `first=k` option.
Is such an option worth suggesting?

Thanks,
Alan Isaac
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to