[Numpy-discussion] Boolean array formatting poll

Todd Miller jmiller at stsci.edu
Wed Sep 10 13:37:03 CDT 2003


<snip>

> 
> For what I mean, note in Python 2.3:
> 
> >>> a = True
> >>> a
> True
> >>> a * 5
> 5
> 
> 
> Can you do this in NumArray?

The numarray analog is:

>>> numarray.ones((10,), type=numarray.Bool)*5
array([5, 5, 5, 5, 5, 5, 5, 5, 5, 5])

So, yes.


-- 
Todd Miller 			jmiller at stsci.edu
STSCI / ESS / SSB





More information about the Numpy-discussion mailing list