summaryrefslogtreecommitdiff
path: root/numpy/ma
Commit message (Collapse)AuthorAgeFilesLines
...
| * | 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-182-24/+15
| | |
| * | MAINT: Improve comments and tests, in response to reviewEric Wieser2017-07-162-13/+29
| | |
| * | BUG: np.ma.masked is mutableEric Wieser2017-06-302-1/+27
| | |
| * | BUG: Prevent copies of np.ma.MaskedConstant from being created by .view.Eric Wieser2017-06-302-15/+36
| | | | | | | | | | | | | | | | | | 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-302-1/+15
| | | | | | | | | | | | It's still possible to create duplicate MaskedConstants through `.copy()`
| * | ENH: Make duplicated masked constants obviousEric Wieser2017-06-302-1/+11
| | |
* | | Merge pull request #9433 from eric-wieser/transpose-full-viewAllan Haldane2017-09-182-4/+24
|\ \ \ | | | | | | | | BUG: make np.transpose return a view of the mask
| * | | BUG: Make transpose and diagonal masks be viewsEric Wieser2017-09-052-4/+24
| | | | | | | | | | | | | | | | 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
| | | |
* | | | MAINT: improve struct assignment, allow multi fields viewsAllan Haldane2017-09-071-0/+5
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit attempts to make structure assignment more consistent, and then changes multi-field indices to return a view instead of a copy. Assignment between structures now works "by field position" rather than "by field name". Fixes #2353, fixes #6085, fixes #3351, fixes #6085, fixes #6314, fixes #2346, fixes #7058, fixes #3641, fixes #5994, fixes #7262, fixes #7493
* | | Merge pull request #9432 from eric-wieser/masked-0d-methodsCharles Harris2017-08-272-19/+39
|\ \ \ | |/ / | | | BUG: Fix loss of masks in masked 0d methods
| * | BUG: Keep mask when calling methods on 0d arrays.Eric Wieser2017-08-132-10/+33
| | | | | | | | | | | | | | | | | | This also prevents `.squeeze()` from ever returning `masked`, which was incorrect Fixes gh-9430.
| * | MAINT: Collect together _arraymethods, and remove duplicate 'copy'Eric Wieser2017-08-121-9/+6
| | |
* | | BUG: MaskedArray._optinfo is discarded by__eq__/__ne__ (#9540)David Schaefer2017-08-132-0/+20
|/ /
* | 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-056-48/+48
| | | | | | | | | | | | | | 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
* | MAINT: Add a common subclass to all the masked ufunc wrappersEric Wieser2017-07-241-27/+21
| |
* | Merge pull request #9452 from eric-wieser/new-style-classesCharles Harris2017-07-242-12/+12
|\ \ | | | | | | MAINT: Use new-style classes on 2.7
| * | MAINT: Use new-style classes on 2.7Eric Wieser2017-07-242-12/+12
| | | | | | | | | | | | Deliberately avoids tests, to prevent introducing a failure on old-style classes later.
* | | 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-064-11/+12
|\ \ | | | | | | ENH: Rearrange testing module to isolate nose dependency.
| * | MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-044-11/+12
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-012-1/+6
|/
* Merge pull request #9322 from eric-wieser/ma-astypeahaldane2017-06-272-7/+12
|\ | | | | BUG: np.ma.astype fails on structured types
| * BUG: MaskedArray.astype fails for non-trivial structured typesEric Wieser2017-06-272-7/+12
| |
* | BUG: Overhaul *_fill_value functionsEric Wieser2017-06-272-82/+75
| | | | | | | | | | | | | | | | | | | | 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
* | MAINT: Remove cycle between _check_fill_value and default_fill_valueEric Wieser2017-06-271-21/+17
| |
* | 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-272-1/+15
| | | | | | | | Fill values were not correctly calculated for subdtypes, instead returning `None`
* | MAINT: De-duplicate ma.m(ax|in)imum_fill_valueEric Wieser2017-06-271-26/+18
|/
* Merge pull request #5580 from jakirkham/fix_masked_array_viewsCharles Harris2017-06-093-93/+105
|\ | | | | 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: Share masked array views for writing.John Kirkham2017-01-171-24/+1
| |
* | BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-034-6/+6
| | | | | | | | Bare except is very rarely the right thing
* | MAINT: Simplify if statementk_kapp@yahoo.com2017-05-241-1/+1
| | | | | | | | | | | | | | | | isinstance(obj, ndarray) will return False if (obj is None) in any case, so no need to check whether (obj is not None) before it. All tests pass on my build (the most recent one at the time making this PR). However, this might have been done for backward compatibility. Will see how the CI tests do.
* | ENH: Spelling fixesVille Skyttä2017-05-094-9/+9
| |
* | Merge pull request #8421 from seberg/isnatCharles Harris2017-05-072-7/+5
|\ \ | | | | | | ENH: Add isnat function and make comparison tests NAT specific
| * | BUG: Remove warning NaT filter from masked array test utilsSebastian Berg2017-05-072-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | MAINT: add __doc__ to minimumEric Wieser2017-05-061-32/+8
| | | | | | | | | | | | Also, remove unecessary subclasses
* | | STY: Tabs to spacesEric Wieser2017-05-061-20/+20
| | | | | | | | | | | | Introduced by me in #8918
* | | DEP: inconsistent axis default for np.ma.maximumEric Wieser2017-05-063-14/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | This does not match np.maximum, which is confusing because the masked version has no documentation at all. This uses a similar deprecation approach to gh-8918, noting that the warning is only needed for arrays of more than one dimension. The same remarks apply to `np.ma.minimum`
* | | DEP: Deprecate single-argument np.ma.m(in|ax)imumEric Wieser2017-05-064-13/+27
| | | | | | | | | | | | | | | | | | | | | | | | This shorthand is just inconsistent with `np.maximum`, and just makes the distinction between `np.ma.max` and `np.ma.maximum` even more confusing. Also adds names to these objects, since 1) they're there in core, and 2) they make the warning message more helpful.
* | | DEP: Deprecate np.ma.MaskedArray.miniEric Wieser2017-05-061-0/+22
|/ / | | | | | | | | | | This was untested, and the documentation did not mention how it differed from `min` anyway. Fixes #8764
* | Merge pull request #8918 from eric-wieser/deprecate-ma-argsort-no-axisCharles Harris2017-05-052-4/+87
|\ \ | | | | | | DEP: deprecate calling ma.argsort without an axis
| * | DEP: deprecate calling ma.argsort without an axisEric Wieser2017-05-052-4/+87
| | | | | | | | | | | | | | | | | | Only deprecated when this would be ambiguous. Approaches #8701
* | | BUG: np.ma.mr_['r',...] does not return masked arraysEric Wieser2017-05-052-0/+14
| | |