summaryrefslogtreecommitdiff
path: root/numpy/ma/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "DEP: issue deprecation warning when creating ragged array (NEP 34)"revert-14794-nep-0034-implRalf Gommers2019-12-061-1/+1
|
* Merge pull request #14794 from mattip/nep-0034-implRalf Gommers2019-12-021-1/+1
|\ | | | | DEP: issue deprecation warning when creating ragged array (NEP 34)
| * DEP: issue deprecation warning when creating ragged array (NEP 34)mattip2019-10-311-1/+1
| |
* | DEP: Deprecate the axis argument to masked_rows and masked_colsEric Wieser2019-12-021-0/+13
|/ | | | | This argument isn't used, and is confusing. (Small test added by seberg)
* Merge pull request #14145 from eric-wieser/fix-14140Sebastian Berg2019-07-301-0/+7
|\ | | | | BUG: Remove the broken clip wrapper
| * BUG: Remove the broken clip wrapperEric Wieser2019-07-281-0/+7
| | | | | | | | | | | | ndarray.clip is already just a wrapper for the ufunc, so there is no need to do type-specific wrapping here any more Fixes gh-14140
* | MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-013-14/+14
|/
* Merge pull request #10308 from eric-wieser/mask-attr-is-viewMatti Picus2019-05-122-9/+16
|\ | | | | 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-112-9/+16
| | | | | | | | | | | | | | | | 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
* | BUG: ma.tostring should respect the order parameterPeter Bell2019-05-071-0/+4
|/
* MAINT: Convert property to @propertyAlex Watt2019-02-241-2/+2
|
* MAINT: Move pickle import to numpy.compatCharles Harris2019-02-213-3/+3
| | | | | | | 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
* | 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-301-0/+5
| | | | | | | | | | 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-191-0/+11
|/ | | | 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 MaskedArray fill_value type conversion.Charles Harris2018-10-201-1/+23
| | | | | | | 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-103-41/+48
| | | | | | | | 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
* 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-021-0/+15
|\ | | | | BUG: Prevent crashes on 0-length structured void scalars
| * BUG: Prevent crashes on 0-length structured void scalarsEric Wieser2018-06-101-0/+15
| |
* | BUG: Undo behavior change in ma.masked_values(shrink=True)Eric Wieser2018-06-101-0/+6
|/ | | | | | This change was introduced as part of #10232 Fixes #11112
* Merge pull request #10314 from mhvk/ma-array-finalize-mask-viewEric Wieser2018-05-293-2/+18
|\ | | | | BUG: Ensure __array_finalize__ cannot back-mangle shape
| * BUG: Ensure __array_finalize__ cannot back-mangle shapeMarten H. van Kerkwijk2018-05-163-2/+18
| |
* | BUG: __copy__ and __deepcopy__ should preserve MaskedConstant (#11038)Kritika Jalan2018-05-251-0/+10
| | | | | | 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-273-155/+22
| | | | | | 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.
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-067-36/+7
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Switch to using pytest markersCharles Harris2018-04-042-9/+10
| | | | | | | | | | | Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
* Merge pull request #10786 from lakshayg/stablesortJulian Taylor2018-03-311-0/+6
|\ | | | | ENH: Add "stablesort" option to inp.sort as an alias for "mergesort".
| * add test for stable sortLakshay Garg2018-03-251-0/+6
| |
* | BUG: Always return a list from np.ma.flatnotmasked_contiguousEric Wieser2018-03-251-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Depending on the input, this would return: * A single slice, if mask=nomask * A list of slices, if mask is an array * None, if mask is fully masked The documented return value is a list, and all downstream callers of this function end up having to correct for it not being one. This affects the result of np.ma.notmasked_contiguous, which also did not document these unusual return values.
* | TST: simplify test of notmasked_contiguousEric Wieser2018-03-251-13/+22
|/
* Merge pull request #10479 from eric-wieser/masked-array-out-fixMarten van Kerkwijk2018-01-261-0/+25
|\ | | | | BUG: Calling ufuncs with a positional output argument causes the result to inherit the output's mask
| * BUG: Calling ufuncs with a positional output argument causes the result to ↵Eric Wieser2018-01-251-0/+25
| | | | | | | | | | | | | | | | | | inherit the output's mask This brings `np.add(a, b, out)` in line with `np.add(a, b, out=out)`. These previously differed because gh-10459 causes them to call __array_wrap__ in different ways (with and without the output argument in the context tuple, respectively). Since the data in the `out` argument is never used by ufuncs, it seems consistent that the mask should not be either.
* | STY: Break some long lines.Charles Harris2018-01-181-1/+2
| | | | | | [ci skip]
* | ref to issue in numpy.maAnas Khan2018-01-101-0/+1
| |
* | adding new tests for union1dAnas Khan2018-01-091-0/+6
|/
* BUG: Masked singleton can be reshaped to be non-scalarEric Wieser2018-01-011-0/+4
| | | | It's possible this is the cause of gh-10270, where it seems something is wrong with the shape
* Merge pull request #10232 from eric-wieser/use-isclose-in-masked_valuesCharles Harris2017-12-181-0/+15
|\ | | | | BUG: Don't reimplement isclose in np.ma
| * BUG: Don't reimplement isclose in np.maEric Wieser2017-12-181-0/+15
| | | | | | | | This fixes gh-10227, as well as some other problems that weren't previously known.
* | Merge pull request #10211 from mhvk/ma-astype-alternativeEric Wieser2017-12-181-2/+29
|\ \ | |/ |/| MAINT,ENH: remove MaskedArray.astype, as the base type does everything.
| * MAINT,ENH: remove MaskedArray.astype, as the base type does everything.Marten van Kerkwijk2017-12-181-2/+29
| | | | | | | | | | With a slight update to `__array_finalize__`, this also fixes the mask ordering to be the same as that of the data.
* | ENH: added masked version of 'numpy.stack' with tests.lzkelley2017-12-171-1/+83
| | | | | | | | | | Uses '_fromnxfunction_seq' just like 'vstack', 'hstack', etc. Added release note to 1.15.0.
* | ENH: Allow np.r_ to accept 0d arraysEric Wieser2017-12-111-0/+9
|/ | | | Fixes gh-9233