summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* * added .torecords(), to convert a masked array to a flexible array with ↵pierregm2008-07-181-0/+32
| | | | fields '_data' and '_mask'
* FOR BUILDBOT: More unsavory workarounds for Sparc64. Change back when we've ↵Robert Kern2008-07-172-2/+2
| | | | fixed the actual bug.
* FOR BUILDBOT: Change the test to make sure the double is aligned to a ↵Robert Kern2008-07-171-1/+1
| | | | reasonable boundary. It does no harm to the test, but it shouldn't be necessary. However, I need the buildbots to test it out on the Sparc64 platform for me.
* testutilspierregm2008-07-172-16/+82
| | | | | | | | | | | * improved check on object/record arrays core * fixed filled for flexible types * fixed the definition of the mask for flexible types mrecords: * fixed a bug w/ titles/formats in __new__ and __array_finalize__
* Corrected a goof in .reshape()pierregm2008-07-021-2/+2
|
* Restore old test framework classes.Alan McIntyre2008-06-215-5/+5
| | | | | | | | | | | Added numpy.testing.run_module_suite to simplify "if __name__ == '__main__'" boilerplate code in test modules. Removed numpy/testing/pkgtester.py since it just consisted of an import statement after porting SciPy r4424. Allow numpy.*.test() to accept the old keyword arguments (but issue a deprecation warning when old arguments are seen). numpy.*.test() returns a test result object as before. Fixed typo in distutils doc.
* fixed dictionary update for compatibility with Python 2.3pierregm2008-06-171-1/+1
|
* Switched to use nose to run tests. Added test and bench functions to all ↵Alan McIntyre2008-06-175-189/+175
| | | | modules.
* core.MaskedArray.__new__pierregm2008-06-161-0/+12
| | | | * Force a mask to be created from a list of masked arrays when mask=nomask and keep_mask=True
* CHANGES:pierregm2008-06-083-1132/+1446
| | | | | | | | | | | | | | | | | | | core: * When creating a masked array with named fields, the mask has now a flexible type [(n,bool) for n in fields], which allows individual fields to be masked. * When a masked array has named fields, setting the mask to a sequence of booleans will set the mask of all the fields of the corresponding record. * A new property, recordmask, returns either the mask (when no named fields) or a boolean array where values are True if all the fields of one record are masked, False otherwise. * A new private attribute, _isfield, has been introduced to keep track whether an array is a field of a record-like masked array or not, and make sure that the mask is properly propagated. * Setting an existing mask to nomask will only fill the mask with False, not transform it to nomask mrecords: * _fieldmask is now only a synonym for _mask, kept for convenience * revamped __getattribute__ to the example of numpy.core.records.recarray.__getattribute__ * __setslice__ and filled are now inhertied from MaskedArray tests * The tests in test_core have been reorganized to improve clarity and avoid duplication. * test_extras now uses the convention "import numpy as np"
* * revamped the functions min/max so that the methods are calledpierregm2008-06-081-0/+119
| | | | | * revamped the methods sum/prod/var/std/min/max/round to accept an explicit out argument * Force var to return masked when a masked scalar was returned
* * revamped choose to accept the out and mode keywordspierregm2008-06-071-3/+69
| | | | | * revamped argmin/argmax to accept the out keyword * revamped all/any to accept the out keyword
* simplified MaskedArray.__setitem__ to fix setting object-ndarray elementspierregm2008-06-041-0/+13
|
* use tempfile.mkstemp for the creation of temporary filespierregm2008-06-031-6/+6
|
* corepierregm2008-06-031-0/+5
| | | | | | * masked_values now accept a shrink argument * fixed the divide_tolerance to numpy.finfo(float).tiny (bug #807) * in MaskedArray.__idiv__, use np.where instead of np.putmask to mask the denominator
* core:pierregm2008-06-031-5/+86
| | | | | | | | | | | | | | | | | | | | | | | | | * use the "import numpy as np" convention * use np.function instead of (from)numeric.function * CHANGE : when using named fields, the fill_value is now a void-ndarray (and no longer a tuple) * _check_fill_value now checks that an existing fill_value is compatible with a new dtype (bug #806) * fix_invalid now accepts the mask keyword * MaskedArray.__new__ doesn't run _check_fill_value when the fill_value is None * add the astype method, to support the conversion of fill_value when needed. * arange/empty/empty_like/ones/zeros are now available through _convert2ma test_core: * modified test_filled_value to reflect that fill_value is a void-ndrecord when using named fields * added test_check_fill_value/test_check_fill_value_with_records testutils: * use the "import numpy as np" convention * assert_equal_records now uses getitem instead of getattr * assert_array_compare now calls numpy.testing.utils.assert_array_compare on filled data * the assert_xxx functions now accept the verbose keyword mrecords: * MaskedRecords inherit get_fill_value and set_fill_value from MaskedArray * In filled, force the filling value to be a void-ndarray
* mrecords : Make sure a field shares its mask with the whole arraypierregm2008-05-291-2/+17
| | | | | mrecords : IMPORTANT : the mask of a field is no longer set to nomask when it's full of False, which simplifies masking specific fields. extras : Reorganized personal comments
* core : __new__: keep the fill_value of the initializing object by defaultpierregm2008-05-261-1/+3
| | | | mrecords: force _guessvartypes to return numpy.dtypes instead of types
* test_set_fields: filter out the warningpierregm2008-05-221-0/+2
|
* fixed whitespace w/ reindentJarrod Millman2008-05-222-5/+5
|
* Fix one small error in test(all=1).Charles Harris2008-05-211-0/+1
|
* mrecords : fixed fromarrays when importing only one recordpierregm2008-05-161-0/+4
| | | | extras : fixed a bug in the naming convention
* extras : dropped the m prefix in mediff1d, mvander, mpolyfitpierregm2008-05-142-13/+23
| | | | mrecords: fixed __setitem__ to update the mask if needed.
* extras: introduced mvander and mpolyfitpierregm2008-05-131-0/+30
|
* power : fixed a bug when a scalar is the first argumentpierregm2008-05-121-3/+10
| | | | | MaskedArray.__pow__ : call power MaskedArray.__ipow__: works in place. Note that the _data part gets "fixed" (NaNs/Infs set to fill_value)
* core : power : use the quick-and-dirty approach: compute everything and mask ↵pierregm2008-05-121-1/+5
| | | | | | | afterwards : MaskedArray._update_from(obj) : ensure that _baseclass is a ndarray if obj wasn't one already : introduced clip in the namespace, just for convenience
* core : power : mask all negative values when the exponent (b) doesn't ↵pierregm2008-05-091-0/+5
| | | | satisfy b==b.astype(int)
* core : power : mask all negative values when the exponent (b) doesn't ↵pierregm2008-05-091-0/+1
| | | | satisfy (abs(b-int(b))<np.finfo(float).precision)
* core : prevent power to mask negative values when it should notpierregm2008-05-071-0/+5
|
* core : force .compressed() to return a type(_baseclass) object (usually a ↵pierregm2008-05-051-3/+17
| | | | | | ndarray) : fixed a bug in .compressed() when the _baseclass is a matrix
* core : clean up update_frompierregm2008-05-011-1/+1
|
* core : fixed a bug w/ array((0,0))/0.pierregm2008-04-301-0/+4
| | | | | | testutils : introduced assert_almost_equal/assert_approx_equal: use assert_almost_equal(a,b,decimal) to compare a and b up to decimal places use assert_approx_equal(a,b,decimal) to compare a and b up to b*10.**-decimal
* removed tests/test_mstat and tests/test_morestats (now available in scipy)pierregm2008-04-252-289/+0
|
* __float__ : raises a TypeError exception for arrays longer than 1pierregm2008-04-232-7/+10
| | | | __int__ : raises a TypeError exception for arrays longer than 1
* mrecords: clean-uppierregm2008-04-201-0/+8
| | | | | | core: MaskedArray.__setitem__ : when hardmask is False, force the data to be updated before the mask. core: MaskedArray.round_ : fixed to keep the dates on TimeSeries core: round : simplified
* ran reindent in preparation for the 1.1 releaseJarrod Millman2008-04-203-25/+25
|
* core:pierregm2008-04-141-51/+73
| | | | | | | | | | | | | | fix_invalid : use isfinite & skip setting a mask is there's no invalid data _update_from: force the default hardmask to False (instead of relying on class default) extras: cleanup mrecords: modified to meet new standards (import numpy as np) __array_finalize__ : skip the call to _update_from and directly update __dict__ __setmask__ : allow an update from a valid fieldmask mask : as recognizable property
* Fix maskedarray's std and var of complex arrays, with test. Add test for ddof.aarchiba2008-04-071-0/+54
|
* core: pierregm2008-04-073-3/+3
| | | | | | | | | | compressed : make sure that the result is always an array. count : make sure that a regular ndarray is returned. added the get_fill_value function extras: added the expand_dims function deleted varu/stdu (redundant with the ddof=1 parameter)
* Add tests for ddof parameter in var/std [patch by Anne Archibald].Stefan van der Walt2008-04-061-0/+2
|
* new methods : roundpierregm2008-03-271-0/+15
| | | | | new functions : frombuffer, fromfunction, identity, indices, trace to fix : fromfile/tofile raise a NotImplementedError. For now.
* Remove broken ma test.Stefan van der Walt2008-03-231-2/+0
|
* core : fixed sort when axis is Nonepierregm2008-03-222-5/+36
| | | | | | | mstats : fixed mmedian, renamed to median and moved to numpy.ma.extras for compatibility extras : introduced median from mstats mrecords: * fixed __array_finalize__ to keep the mask of a masked array when viewing it as a mrecarray * simplified _getdata
* - fixed masked_where (bug #703)pierregm2008-03-181-1/+10
| | | | | - simplified 'masked_invalid' and added it to __all__ - added the 'out' optional parameter to .mean
* updated API_CHANGES.txtpierregm2008-02-151-0/+11
| | | | | | mstats : updated docstrings morestats : updated docstrings core : fixed __setitem__ for records
* Remove .data comparisons in tests. Fix whitespace.Stefan van der Walt2008-02-072-8/+1
|
* Ignore DeprecationWarning during testing.Stefan van der Walt2008-02-061-2/+5
|
* Remove print statement from test.Stefan van der Walt2008-02-061-1/+0
|
* maskedarray.core:pierregm2008-02-012-105/+281
| | | | | | | | tolist : make sure that a masked record is output as a tuple of None maskedarray.mrecords: * introduced mrecarray as the equivalent of recarray w/ fieldmask * simplified fromarrays/fromrecords
* maskedarray.core:pierregm2008-01-281-0/+16
| | | | | * fixed compress (third time the charm?) * fixed a pb w/ get_fill_value when fill_value is None: now recognized records.