[Numpy-discussion] Use-case for np.choose

David Goldsmith d.l.goldsmith at gmail.com
Sat Nov 7 16:04:35 EST 2009


Hi, all!  I'm working to clarify the docstring for np.choose (Stefan pointed
out to me that it is pretty unclear, and I agreed), and, now that (I'm
pretty sure that) I've figured out what it does in its full generality
(e.g., when the 'choices' array is greater than 2-D), I'm curious as to
use-cases.  (Not that I'm suggesting that we deprecate it, but I am curious
as to whether or not anyone is presently using it and if so, how they're
using it, esp. if anyone *is* using it with 'choices' arrays 3-D or
greater.)

Also, my experimenting suggests that the index array ('a', the first
argument in the func. sig.) *must* have shape (choices.shape[-1],) - someone
please let me know ASAP if this is not the case, and please furnish me w/ a
counterexample because I was unable to generate one myself.

Thanks,

DG
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20091107/86119f61/attachment.html>


More information about the NumPy-Discussion mailing list