[SciPy-dev] slicing using Index and Mask arrays

Travis Oliphant oliphant at ee.byu.edu
Sat Jun 5 00:10:04 CDT 2004


I have just added a feature to scipy in CVS

This feature lets

a[a > 3] = 10
a[indexarray] = 3

and so forth  to function.

Currently
a[maskarray]  and a[indexarray]
always return a 1-d array (multidimensional returns not yet supported)

while
a[maskarray] = obj   and a[indexarray]= obj
will keep the shape of a

To enable the new feature you must type (we will do this by default on 
scipy import at some point)

scipy.alter_numeric()

You can get back old numeric behavior using

scipy.restore_numeric()


Please report any bugs you find...

-Travis O.









More information about the Scipy-dev mailing list