On 4/12/2014 5:20 PM, Alexander Belopolsky wrote:
> The "set routines" [1] are in this category and may help
> you deal with partitions, but I would recommend using
> boolean arrays instead. If you commonly deal with both
> a subset and a complement, set representation does not
> give you a memory advantage over a boolean mask.

I take it that by a lack of a memory advantage you mean
because boolean arrays are 8 bit representations.
That makes sense.

I find it rather more convenient to use boolean arrays,
but I wonder if arrays of indexes might have other
advantages (which would suggest using the set operations
instead). In particular, might a[boolean_array] be slower
that a[indexes]?  (I'm just asking, not suggesting.)

Thanks!
Alan

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

Reply via email to