summaryrefslogtreecommitdiff
path: root/numpy/ma
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10308 from eric-wieser/mask-attr-is-viewMatti Picus2019-05-123-10/+19
|\ | | | | API: Make MaskedArray.mask return a view, rather than the underlying mask
| * API: Make MaskedArray.mask return a view, rather than the underlying maskEric Wieser2019-05-113-10/+19
| | | | | | | | | | | | | | | | This prevents consumers from reshaping the mask in place, which breaks things As a result, `x.mask is x.mask` returns `False`, but this was already true of `x.data is x.data`. May also be related to gh-10270
* | ENH: Radix sortHameer Abbasi2019-05-111-7/+7
| |
* | BUG: ma.tostring should respect the order parameterPeter Bell2019-05-072-1/+5
|/
* DOC: fix some more See Also issuesRalf Gommers2019-04-141-6/+6
| | | | These ones just generated warnings, not build failures
* DOC: fix docstring for floor_divide (#13242)Assem2019-04-021-1/+1
| | | * DOC: fix docstring for floor_divide
* DEV: cleanup imports and some assignments (from LGTM)mattip2019-03-174-12/+7
|
* DOC: fixes from reviewmattip2019-02-281-5/+22
|
* DOC: Simplify .real and .imag docstrings for MaskedArrayEric Wieser2019-02-271-22/+4
|
* MAINT: First pass at merging docstringsAlex Watt2019-02-241-56/+26
|
* MAINT: respond to PR feedbackAlex Watt2019-02-241-9/+9
|
* MAINT: Convert property to @propertyAlex Watt2019-02-243-41/+48
|
* MAINT: Move pickle import to numpy.compatCharles Harris2019-02-214-4/+4
| | | | | | | The pickle module was being imported from numpy.core.numeric. It was defined there in order to use pickle5 when available in Python3 and cpickle in Python2. The numpy.compat module seems a better place for that.
* ENH: remove "Invalid value" warnings from median, percentilemattip2019-01-061-65/+42
|
* Merge pull request #11721 from eric-wieser/fix-9647Charles Harris2018-12-161-2/+2
|\ | | | | BUG: Make `arr.ctypes.data` hold onto a reference to the underlying array
| * BUG: Make `arr.ctypes.data` hold onto a reference to the underlying arrayEric Wieser2018-10-301-2/+2
| | | | | | | | | | | | | | | | We do this by going through ctypes.from_buffer, which keeps the object the buffer came from alive. A bunch of hacks are required to produce a sufficiently simple buffer for ctypes to accept. Fixes #9647
* | TST, DOC: enable refguide_checkTyler Reddy2018-12-142-588/+680
| | | | | | | | | | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-065-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* | BUG: IndexError for empty list on structured MaskedArray.Marten van Kerkwijk2018-11-302-3/+8
| | | | | | | | | | This should give an empty result, not an error. The problem was that the empty list was interpreted as a list of strings.
* | BUG: multifield-view of MaskedArray gets bad fill_valueAllan Haldane2018-11-192-6/+19
|/ | | | Fixes #10483
* TST: Add masked array tests for '==' and '!='.Charles Harris2018-10-241-5/+145
| | | | | Cover the string and numeric types. Structured types were already covered.
* BUG: Fix fill value in masked array '==' and '!=' ops.Charles Harris2018-10-241-5/+18
| | | | | | | The type of the fill_value needs to be `bool_` in order to match the result type of `==` and `!=`. Closes #12248.
* BUG: Fix MaskedArray fill_value type conversion.Charles Harris2018-10-202-6/+30
| | | | | | | Fixes the regression introduced by #10211 where the masked array fill value type was not properly converted by astype. Closes #12070.
* MAINT, TST import pickle from numpy.core.numericPierre Glaser2018-10-104-46/+49
| | | | | | | | All imports of pickle from numpy modules are now done this way: >>> from numpy.core.numeric import pickle Also, some loops on protocol numbers are added over pickle tests that were not caught from #12090
* MAINT: Eliminate the private `numerictypes._typestr`Eric Wieser2018-09-201-19/+0
| | | | | This was used internally only by a private function that is also unused. The loop adding type aliases was shown by #12007 to have no effect.
* MAINT: refactor design of recursive closures (#11910)Matti Picus2018-09-161-2/+4
|
* TST: Replace calls to unittest.TestCase.fail (#11933)Roman Yurchak2018-09-121-6/+2
| | | | | | | | After the pytest migration, test classes no longer inherit from unittest.TestCase and and the fail method does not exist anymore. In all these cases, we can use assert_raises and assert_raises_regex instead
* MAINT: reformat line spacing before test methodsmattip2018-08-191-3/+0
|
* BUG: Fix test sensitive to platform byte order.Charles Harris2018-08-181-8/+3
| | | | | | | | | The TestMaskedArrayMethods.test_sort_flexible test was failing for for the subarray checks on big endian systems. That was probably due to subarrays being sorted as bytestrings. This fixes the test by simply checking that the sort does not error rather than checking the result. Closes #11716.
* Merge pull request #11299 from eric-wieser/ma-fieldless-dtypeAllan Haldane2018-08-022-21/+35
|\ | | | | BUG: Prevent crashes on 0-length structured void scalars
| * BUG: Prevent crashes on 0-length structured void scalarsEric Wieser2018-06-102-21/+35
| |
* | ENH: Make expand_dims work on subclassesEric Wieser2018-07-291-51/+1
| | | | | | | | This allows np.ma.expand_dims to be removed
* | MAINT: Move pytesttester outside of np.testing, to avoid creating ↵Eric Wieser2018-07-021-1/+1
| | | | | | | | | | | | | | | | unnecessary import dependencies pytesttester is used by every single subpackage, so making it depend on np.testing just creates cyclic dependencies that can lead to circular imports Relates to #11457
* | DOC: Clear up confusion between np.where(cond) and np.where(cond, x, y)Eric Wieser2018-06-291-14/+11
| | | | | | | | | | | | | | | | Eliminates all mentions of `np.where(cond)`, instead pointing the reader to np.nonzero. Also changes some example numbers to avoid collisions, making them easier to follow. Some minor doc improvements for np.ma.where too.
* | HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-2/+2
| |
* | BUG: Undo behavior change in ma.masked_values(shrink=True)Eric Wieser2018-06-102-2/+10
|/ | | | | | This change was introduced as part of #10232 Fixes #11112
* Merge pull request #10314 from mhvk/ma-array-finalize-mask-viewEric Wieser2018-05-294-9/+45
|\ | | | | BUG: Ensure __array_finalize__ cannot back-mangle shape
| * MAINT: Replace ma.__setattr__ with dtype and shape overrides.Marten van Kerkwijk2018-05-161-8/+23
| | | | | | | | | | Since dtype and shape are properties, this needs a somewhat ugly super construction; see https://bugs.python.org/issue14965
| * BUG: Ensure __array_finalize__ cannot back-mangle shapeMarten H. van Kerkwijk2018-05-164-3/+24
| |
* | Merge pull request #11105 from eric-wieser/take_along_axis-strictMarten van Kerkwijk2018-05-282-33/+13
|\ \ | | | | | | ENH: Add (put|take)_along_axis
| * | MAINT: rewrite np.ma.(median|sort) to use take_along_axisEric Wieser2018-05-252-33/+13
| | |
* | | Merge pull request #11120 from eric-wieser/simplify-ma-ctorMarten van Kerkwijk2018-05-261-11/+4
|\ \ \ | | | | | | | | MAINT: remove redundant code in MaskedArray.__new__
| * | | STY: Add blank lineEric Wieser2018-05-261-0/+1
| | | |
| * | | MAINT: remove redundant code in MaskedArray.__new__Eric Wieser2018-05-181-11/+3
| | |/ | |/|
* | | BUG: __copy__ and __deepcopy__ should preserve MaskedConstant (#11038)Kritika Jalan2018-05-252-0/+16
| |/ |/| | | Fixes #11021
* | MAINT: move remaining MaskedArray matrix tests to matrixlib.Marten van Kerkwijk2018-05-221-15/+0
|/
* MAINT: move all masked array matrix tests to matrixlib.Marten van Kerkwijk2018-04-275-166/+38
| | | | | | Further progress in isolating matrix in preparation of its deprecation. There is one place left with an explicit reference to matrix (in MaskedArray.count), which is to be solved later.
* BUG: Fix encoding regression in ma/bench.py (Issue #10868)Jonathan March2018-04-091-0/+2
|
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-068-39/+10
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Update modules `test` to PytestTester.Charles Harris2018-04-041-2/+3
| | | | | | | | Numpy can now be tested using the standard `python -c"import numpy; numpy.test()"` construct.