summaryrefslogtreecommitdiff
path: root/numpy/ma
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* 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.
* MAINT: Remove "bench" from testing modules `__init__`s.Charles Harris2018-03-311-1/+0
| | | | | The "bench" testing with the old bench files is no longer supported. These days we use `runtests.py` and `asv`.
* Merge pull request #10786 from lakshayg/stablesortJulian Taylor2018-03-312-2/+8
|\ | | | | ENH: Add "stablesort" option to inp.sort as an alias for "mergesort".
| * add test for stable sortLakshay Garg2018-03-251-0/+6
| |
| * add stablesort in np.sort and point to mergesortLakshay Garg2018-03-231-2/+2
| | | | | | | | Closes #10784
* | BUG: Always return a list from np.ma.flatnotmasked_contiguousEric Wieser2018-03-252-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
|/
* MAINT: Remove use of unittest in NumPy tests.xoviat2018-03-211-1/+2
| | | | | | | | | | | | | | | | This removes a few left over uses of unittest. The main changes apart from removal of Test case are: * `setUp` replaced by nose and pytest compatible `setup` * `tearDown` replaced by nose and pytest compatible `teardown` * `assertRaises` replaced by `assert_raises` * `assertEqual` replaced by `assert_equal` The last two are in `numpy/testings/tests/test_utils.py`, so may seem a but circular, but at least are limited to those two functions. The use of `setup` and `teardown`, can be fixed up with the pytest equivalents after we have switched to pytest.
* TST, DOC: Upload devdocs and neps after circleci build (#10702)Stefan van der Walt2018-03-161-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Upload devdocs and neps after build * Install numpydoc * Fix masked array documentation injection `doc_note` appends a `Notes` section to docstrings, which may lead to duplicate sections. * Add deploy key for neps repo Note that we have to explicitly reset the ~/.ssh/config to only leave one SSH key * Only deploy on master branch * Blow away previous dev docs after each upload * Add tool to upload files to remote repo * Remove numpydoc from pip install; it is included as a submodule * Avoid using invalid escape code * Rename repo upload tool * Use check_call to simplify doc pushing tool
* MAINT: Stop using non-tuple indices internallyEric Wieser2018-02-162-1/+3
| | | | | | By not using this type of indexing, it becomes easier for subclasses to override indexing in a way that works correctly with numpy functions. These locations were found by deprecating the behavior in question, which is deliberately not part of this commit
* BUG: Functions in ma should not add Notes to existing docstrings.Charles Harris2018-02-151-5/+7
| | | | | | | | | Currently, the `doc_note` function in `numpy.ma.core.py` is called to add a "Notes" section to the existing docstrings of the unmasked versions of some functions. This may result in duplicate "Notes" sections, or incorrect placement, which are errors in current numpydoc. This PR disables the `doc_note` function until we can decide on the proper way to deal with the problem.
* MAINT: Remove unused code path for applying maskedarray domains to ufunc ↵Eric Wieser2018-01-261-6/+2
| | | | | | | with nin>2 There are no native ufuncs with this configuration. Additionally, if there were, it would make more since for the domaining function to receive all the arguments, not reduce them pairwise.
* Merge pull request #10479 from eric-wieser/masked-array-out-fixMarten van Kerkwijk2018-01-262-5/+32
|\ | | | | 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-252-5/+32
| | | | | | | | | | | | | | | | | | 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: concatenation using axis=None in union1dAnas Khan2018-01-091-1/+1
| |
* | BUG: arrays not being flattened in `union1d`Anas Khan2018-01-081-1/+1
|/
* More misc. typosluz.paz2018-01-041-1/+1
| | | Found via `codespell`
* Merge pull request #10292 from eric-wieser/no-change-masked-shapeCharles Harris2018-01-012-0/+16
|\ | | | | BUG: Masked singleton can be reshaped to be non-scalar
| * BUG: Masked singleton can be reshaped to be non-scalarEric Wieser2018-01-012-0/+16
| | | | | | | | It's possible this is the cause of gh-10270, where it seems something is wrong with the shape
* | ENH: Allow ptp to take an axis tuple and keepdimsEric Wieser2017-12-281-12/+14
|/
* MAINT: Fix nose features to work on pytestxoviat2017-12-221-0/+1
|
* Merge pull request #10232 from eric-wieser/use-isclose-in-masked_valuesCharles Harris2017-12-182-16/+27
|\ | | | | BUG: Don't reimplement isclose in np.ma
| * BUG: Don't reimplement isclose in np.maEric Wieser2017-12-182-16/+27
| | | | | | | | 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-182-46/+53
|\ \ | |/ |/| 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-182-46/+53
| | | | | | | | | | 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-172-2/+85
| | | | | | | | | | Uses '_fromnxfunction_seq' just like 'vstack', 'hstack', etc. Added release note to 1.15.0.
* | Merge pull request #10216 from eric-wieser/deprecate-pickle-aliasesCharles Harris2017-12-131-1/+1
|\ \ | | | | | | BUG: Fix broken format string picked up by LGTM.com
| * | BUG: Fix broken format string picked up by LGTM.comEric Wieser2017-12-131-1/+1
| | | | | | | | | | | | Fixes regression I introduced in gh-10192
* | | ENH: Allow np.r_ to accept 0d arraysEric Wieser2017-12-111-0/+9
| |/ |/| | | | | Fixes gh-9233
* | Merge pull request #10192 from eric-wieser/deprecate-pickle-aliasesCharles Harris2017-12-111-0/+14
|\ \ | |/ | | DEP: Deprecate the pickle aliases
| * DEP: Deprecate the pickle aliasesEric Wieser2017-12-101-0/+14
| | | | | | | | | | | | * The np.ma functions are misleading, as they do not actually do anything special for ma.array * The np.loads functions doesn't even have numpy-specific documentation, and does not behave consistently with `np.load` * The string overloads of np.ma.load and np.ma.dump do not work well on python 3, as they make assumptions about whether a binary or text pickle file is used (gh-5491)
* | BUG: Fix regression in np.ma.load in gh-10055Eric Wieser2017-12-101-2/+2
|/
* BUG: Fix incorrect wrapping of `MaskedArray`Eric Wieser2017-12-081-2/+4
| | | | | | Missed in gh-10176. Already in the non-legacy branch, so no need to gate it here.
* BUG: stray comma should be preserved for legacy printingAllan Haldane2017-11-291-2/+2
| | | | Fixes #10059
* ENH: Improve MaskedArray.__repr__Eric Wieser2017-11-203-21/+153
| | | | | | | * 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: Have np.ma.dump and np.ma.load close their files (#10055)orbit-stabilizer2017-11-191-4/+8
| | | Fixes #10045
* ENH: don't show boolean dtype, as it is impliedEric Wieser2017-11-132-18/+18
|
* BUG: str(arr0d) and unicode(arr0d) should never go through ↵Eric Wieser2017-11-122-0/+18
| | | | | | | | np.set_string_function It's more important that scalars and 0d arrays are consistent here. Previously, unicode(arr0d) would crash on 2.7
* DEP, ENH: deprecate UPDATEIFCOPY (except for nditer) and replace with ↵Matti Picus2017-11-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WRITEBACKIFCOPY (#9639) * ENH: add API to resolve UPDATEONCOPY outside dealloc, test and use * BUG: Fix usage of keyword "from" as argument name for "can_cast". Also removed inconsistency between the second argument name between documentation ("totype") and code ("to"). * UPDATEIFCOPY -> WRITEBACKIFCOPY, documentation * fixes for review * review2, fix new test * fix new test for using self.assert_deprecated * change deprecation logic as per review * new logic exposed places where PyArray_ResolveWritebackIfCopy not called * deprecate PyArray_XDECREF_ERR in favor of PyArray_DiscardWritebackIfCopy * code review changes * clean up merge cruft * fix from review * fixes from review * extend the release note
* MAINT: Make private helper function non-public instead.Charles Harris2017-10-251-2/+2
|
* MAINT: Separate stringification from masked_print_option-insertionEric Wieser2017-10-231-4/+7
| | | | This means we can implement `__unicode__` easily too, or perhaps `__format__` in future
* MAINT: Remove branching from MaskedArray.__repr__, and line-wrapEric Wieser2017-10-231-37/+47
|