summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* BUG: stray comma should be preserved for legacy printingAllan Haldane2017-11-291-2/+2
| | | | Fixes #10059
* ENH: Improve MaskedArray.__repr__Eric Wieser2017-11-202-7/+85
| | | | | | | * Commas are now used within data and mask * dtypes are shown for float32, int8 etc, where they previously weren't * Wrapped fields are now correctly indented * Spaces removed around = to match PEP8
* TST: Improve assertion error messagesEric Wieser2017-11-201-5/+8
|
* BUG: str(arr0d) and unicode(arr0d) should never go through ↵Eric Wieser2017-11-121-0/+10
| | | | | | | | np.set_string_function It's more important that scalars and 0d arrays are consistent here. Previously, unicode(arr0d) would crash on 2.7
* Merge pull request #9817 from kenogo/masterEric Wieser2017-10-041-1/+5
|\ | | | | BUG: Added exception for casting numpy.ma.masked to long
| * BUG: Added exception for casting numpy.ma.masked to longKeno Goertz2017-10-051-1/+5
| | | | | | | | TST: Added test_coercion_long and removed knownfailure from test_coercion_int
* | Merge pull request #9822 from eric-wieser/MaskedConstant-subclassCharles Harris2017-10-041-0/+9
|\ \ | |/ |/| BUG: Allow subclasses of MaskedConstant to behave as unique singletons
| * BUG: Allow subclasses of MaskedConstant to behave as unique singletonsEric Wieser2017-10-041-0/+9
| | | | | | | | Fixes astropy/astropy#6645
* | BUG: fix stray comma in _array2stringStefan Winkler2017-10-031-2/+2
|/ | | | | | _array2string unconditionally added a comma after the '...' that are inserted for arrays exceeding the size threshold. Instead, add the separator character in _formatArray. Fixes #9777.
* Merge pull request #9645 from xoviat/appveyorCharles Harris2017-09-301-0/+4
|\ | | | | ENH: enable OpenBLAS on windows.
| * tests: core: update failure messagexoviat2017-09-091-1/+1
| |
| * TST: fix failures:xoviat2017-09-041-0/+4
| | | | | | | | | | | | 1. fail tests related to DLL load failure as they were previously untested. 2. fix have_compiler to return false on old compilers 3. xfail some tests that were not working on old Python versions.
* | BUG: Don't ignore mismatching shapes just because the mask is all zerosEric Wieser2017-09-281-0/+6
| | | | | | | | Fixes #4520
* | BUG: Shrinking the mask on a structured type errorsEric Wieser2017-09-281-0/+6
| | | | | | | | Now it is a no-op, as elsewhere in the file. Extract the mask-shrinking into a function.
* | BUG: np.ma.trace gives the wrong result on ND arraysEric Wieser2017-09-271-0/+5
| | | | | | | | Fixes #5560
* | BUG: Errors thrown by 0d arrays in setitem are silenced and replacedEric Wieser2017-09-231-1/+24
| | | | | | | | Fixes gh-8461
* | Merge pull request #9336 from eric-wieser/masked-constantCharles Harris2017-09-211-0/+37
|\ \ | | | | | | BUG: Fix various problems with the np.ma.masked constant
| * | TST: Add test for direct writing of `masked`Eric Wieser2017-07-181-2/+4
| | |
| * | BUG: change fix for gh-9328 to make masked.copy() a noopEric Wieser2017-07-181-24/+9
| | |
| * | MAINT: Improve comments and tests, in response to reviewEric Wieser2017-07-161-2/+9
| | |
| * | BUG: np.ma.masked is mutableEric Wieser2017-06-301-0/+9
| | |
| * | BUG: Prevent copies of np.ma.MaskedConstant from being created by .view.Eric Wieser2017-06-301-0/+18
| | | | | | | | | | | | | | | | | | This seems to solve the problem everywhere. It's not clear if this works on PyPy. Fixes gh-9328
| * | BUG: np.ma.masked does not preserve identity through pickleEric Wieser2017-06-301-0/+10
| | | | | | | | | | | | It's still possible to create duplicate MaskedConstants through `.copy()`
| * | ENH: Make duplicated masked constants obviousEric Wieser2017-06-301-0/+6
| | |
* | | Merge pull request #9433 from eric-wieser/transpose-full-viewAllan Haldane2017-09-181-3/+22
|\ \ \ | | | | | | | | BUG: make np.transpose return a view of the mask
| * | | BUG: Make transpose and diagonal masks be viewsEric Wieser2017-09-051-3/+22
| | | | | | | | | | | | | | | | Fixes gh-8506 and fixes gh-7483
* | | | TST: Add new unit tests for structure assignmentAllan Haldane2017-09-071-1/+1
| | | |
* | | | TST: Fix/Remove old unit tests for structure assignmentAllan Haldane2017-09-071-10/+6
| |_|/ |/| |
* | | Merge pull request #9432 from eric-wieser/masked-0d-methodsCharles Harris2017-08-271-2/+29
|\ \ \ | |/ / | | | BUG: Fix loss of masks in masked 0d methods
| * | BUG: Keep mask when calling methods on 0d arrays.Eric Wieser2017-08-131-2/+29
| | | | | | | | | | | | | | | | | | This also prevents `.squeeze()` from ever returning `masked`, which was incorrect Fixes gh-9430.
* | | BUG: MaskedArray._optinfo is discarded by__eq__/__ne__ (#9540)David Schaefer2017-08-131-0/+19
|/ /
* | TST, MAINT: Add `__init__.py` files to tests directories.Charles Harris2017-08-061-0/+0
| | | | | | | | | | | | | | | | This allows pytest to run with duplicate test file names. Note that `python <path-to-test-file>` no longer works with this change, nor will a simple `pytest numpy`, because numpy is imported from the numpy repository. However, `python runtests.py` and `>>> numpy.test()` are still available.
* | MAINT: Remove `level=` keyword from test arguments.Charles Harris2017-08-051-7/+5
| | | | | | | | | | | | I don't know what that argument was used for, but it showis up in old tests and is not explicitly used within the tests. I assume it was part of an old testing framework and is now longer needed.
* | MAINT/DOC: Use builtin when np.{x} is builtins.{x}.Eric Wieser2017-08-053-35/+35
| | | | | | | | | | | | | | This is the case for x in {int, bool, str, float, complex, object}. Using the np.{x} version is deceptive as it suggests that there is a difference. This change doesn't affect any external behaviour. The `long` type is missing in python 3, so np.long is still useful
* | TST: Remove unittest dependencies in numpy/ma/tests.Charles Harris2017-07-247-594/+583
| |
* | Merge pull request #9362 from charris/rearrange-testing-moduleCharles Harris2017-07-061-3/+4
|\ \ | | | | | | ENH: Rearrange testing module to isolate nose dependency.
| * | MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-3/+4
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* | BUG: void masked fillvalue cannot be cast to void in python 3Eric Wieser2017-07-011-0/+5
|/
* Merge pull request #9322 from eric-wieser/ma-astypeahaldane2017-06-271-0/+5
|\ | | | | BUG: np.ma.astype fails on structured types
| * BUG: MaskedArray.astype fails for non-trivial structured typesEric Wieser2017-06-271-0/+5
| |
* | BUG: Overhaul *_fill_value functionsEric Wieser2017-06-271-0/+25
| | | | | | | | | | | | | | | | | | | | These now: * Return void scalars instead of tuples for structured dtypes * Actually accept non-trivial dtype arguments * Work for nested structured and subarray dtypes * Uniformly convert scalar types into dtypes Also fixes #9315
* | TST: Verify that sorting subarrays is fixedEric Wieser2017-06-271-0/+14
| | | | | | | | Tests for gh-8069
* | MAINT: Better names in ma.sort testEric Wieser2017-06-271-12/+12
| |
* | BUG: Fix gh-8069Eric Wieser2017-06-271-0/+9
|/ | | | Fill values were not correctly calculated for subdtypes, instead returning `None`
* Merge pull request #5580 from jakirkham/fix_masked_array_viewsCharles Harris2017-06-092-69/+104
|\ | | | | BUG, DEP: Fix masked arrays to properly edit views. ( #5558 )
| * TST: Update and add tests masked array views.John Kirkham2017-01-172-69/+104
| |
* | BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-1/+1
| | | | | | | | Bare except is very rarely the right thing
* | ENH: Spelling fixesVille Skyttä2017-05-092-2/+2
| |
* | Merge pull request #8421 from seberg/isnatCharles Harris2017-05-071-2/+2
|\ \ | | | | | | ENH: Add isnat function and make comparison tests NAT specific
| * | BUG: Remove warning NaT filter from masked array test utilsSebastian Berg2017-05-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This may show warnings in downstream projects, which should likely not be there. We could also drop in the normal assert_equal there, which would support NaT, and NaN, but checks for scalarness, which this currently does not (which also could create problems). Works around the only test with this problem, by using the normal assert_equal there.