I've made a drop-in replacement for select() which works with large numbers of
conditions, and which consistently outperforms numpy.select for my use case
(scalar condlist).
It fixes a couple of other issues too, and (I feel) improves the internal
documentation of the code. I have included benchmarks and some tests.
https://github.com/gbb/numpy-simple-select
The numpy dev team are welcome to include all or part of this code into the
main numpy distribution or it can be kept separate or ignored if they prefer.
:-)
If you need more than 30 ndarrays in your 'condlist', or if you have an
all-scalar choicelist, I think you will find this code particularly
interesting.
Formal test coverage is incomplete, but I think this is still going to be quite
useful for some people.
Have a nice weekend,
Graeme
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion