ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> numpy-discussion
numpy-discussion
[Numpy-discussion] ANN: An alternative to numpy.core.ma
by Pierre GM other posts by this author
Dec 10 2006 12:06PM messages near this date
Re: [Numpy-discussion] lapack_lite dgesv | [Numpy-discussion] griddata in python from x,y,z coordinates
All,
I just posted on the DeveloperZone of the wiki the latest version of 
maskedarray, an alternative to numpy.core.ma. You can download it here:

http://projects.scipy.org/scipy/numpy/attachment/wiki/MaskedArray/maskedarray-1.00.dev0040.t
ar.gz

The package has three modules: core (with the basic functions of 
numpy.core.ma), extras (which adds some functions, such as apply_along_axis, 
or the concatenator mr_), and testutils (which adds support for maskedarray 
for the tests functions). It also comes with its test suite (available in the 
tests subdirectory).

For those of you who were not aware of it, the new MaskedArray is a subclass 
of ndarray, and it accepts any subclass of ndarray as data. You can use it as 
you would with numpy.core.ma.MaskedArray.

For those of you who already tested the package, the main modifications are:
- the reorganization of the initial module in core+extras.
- Data are now shared by default (in other terms, the copy flag defaults to 
False in MaskedArray.__new__), for consistency with the rest of numpy.
- An additional boolean flag has been introduced: keep_mask (with a default of 
True). This flag is useful when trying to mask a mask array: it tells __new__ 
whether to keep the initial mask (in that case, the new mask will be combined 
with the old mask) or not (in that case, the new mask replaces the old one).
- Some functions/routines that were missing have been added (any/all...)

As always, this is a work in progress. In particular, I should really check 
for the bottlenecks: would anybody have some pointers ? If you wanna be on 
the safe, optimized side, stick to numpy.core.ma. Otherwise, please try this 
new implementation, and don't forget to give me some feedback!


PS:
Technical question: how can I delete some files in the DeveloperZone wiki ? 
The maskedarray.py, test_maskedarray.py, test_subclasses.py are out of date, 
and should be replaced by the package. Thanks a lot in advance !




_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@[...].org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved