| 156 | | The new {{{maskedarray}}} [attachment:maskedarray.py package ] is what I eventually come up with. The main differences with the initial {{{numpy.core.ma}}} package are that {{{MaskedArray}}} is now a subclass of {{{ndarray}}} and that the {{{_data}}} section can now be any subclass of {{{ndarray}}} (well, it should work in most cases, some tweaking might required here and there). Apart from a couple of issues listed below, the behavior of the new {{{MaskedArray}}} class reproduces the old one. It is quite likely to be significantly slower, though: I was more interested into a clear organization than in performance, so I tended to use wrappers liberally. I'm sure we can improve that rather easily. Note that I didn't try to time any methods. |
| 157 | | I also attach a unittest suite ([attachment:test_maskedarray.py here]), modeled after the standard numpy one, along with some utilities for testing ([attachment:masked_testutils.py here]). The old {{{test_ma}}} can also be run with the new package but it does fail in some places, see below. |
| | 156 | The new {{{maskedarray}}} [attachment:maskedarray-1.00.dev0040.tar.gz package ] is what I eventually come up with. The main differences with the initial {{{numpy.core.ma}}} package are that {{{MaskedArray}}} is now a subclass of {{{ndarray}}} and that the {{{_data}}} section can now be any subclass of {{{ndarray}}} (well, it should work in most cases, some tweaking might required here and there). Apart from a couple of issues listed below, the behavior of the new {{{MaskedArray}}} class reproduces the old one. It is quite likely to be significantly slower, though: I was more interested into a clear organization than in performance, so I tended to use wrappers liberally. I'm sure we can improve that rather easily. Note that I didn't try to time any methods. |
| | 157 | I also attach a unittest suite, modeled after the standard numpy one, along with some utilities for testing ([attachment:masked_testutils.py here]). The old {{{test_ma}}} can also be run with the new package but it does fail in some places, see below. |