Pearu Peterson wrote:
a=numarray.arange(6, type=numarray.Bool); a[::2] = 0; a
array([F, T, F, T, F, T], type=Bool)
That's better. However, I"m still inclined to prefer [1, 0, 0, 1, ....
Someone mentioned making clear the distiction between bool and int arrays. HOw distict are they? In Python, the bool type is really just a pretty wrapper around an Int anway. I like it, but if in NumArray, a bool is really and int in disguise, I'd be just as happy to ahve it be 0, 1, 0, .... If however, a bool really is a totally different beast (or will be in a future version), then maybe it's worth making the clear distiction.
For what I mean, note in Python 2.3:
a = True a
a * 5
Can you do this in NumArray?