| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|\ \
| | |
| | | |
BUG: Make `arr.ctypes.data` hold onto a reference to the underlying array
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
* 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
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
| |
| |
| |
| |
| | |
This should give an empty result, not an error. The problem
was that the empty list was interpreted as a list of strings.
|
|/
|
|
| |
Fixes #10483
|
|
|
|
|
| |
Cover the string and numeric types. Structured types were
already covered.
|
|
|
|
|
|
|
| |
The type of the fill_value needs to be `bool_` in order to match
the result type of `==` and `!=`.
Closes #12248.
|
|
|
|
|
|
|
| |
Fixes the regression introduced by #10211 where the masked array fill
value type was not properly converted by astype.
Closes #12070.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
BUG: Prevent crashes on 0-length structured void scalars
|
| | |
|
| |
| |
| |
| | |
This allows np.ma.expand_dims to be removed
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
|/
|
|
|
|
| |
This change was introduced as part of #10232
Fixes #11112
|
|\
| |
| | |
BUG: Ensure __array_finalize__ cannot back-mangle shape
|
| |
| |
| |
| |
| | |
Since dtype and shape are properties, this needs a somewhat
ugly super construction; see https://bugs.python.org/issue14965
|
| | |
|
|\ \
| | |
| | | |
ENH: Add (put|take)_along_axis
|
| | | |
|
|\ \ \
| | | |
| | | | |
MAINT: remove redundant code in MaskedArray.__new__
|
| | | | |
|
| | |/
| |/| |
|
| |/
|/|
| | |
Fixes #11021
|
|/ |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
That function is nose specific and has not worked since `__init__` files
were added to the tests directories.
|
|
|
|
|
|
|
|
| |
Numpy can now be tested using the standard
`python -c"import numpy; numpy.test()"`
construct.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
The "bench" testing with the old bench files is no longer supported.
These days we use `runtests.py` and `asv`.
|
|\
| |
| | |
ENH: Add "stablesort" option to inp.sort as an alias for "mergesort".
|
| | |
|
| |
| |
| |
| | |
Closes #10784
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|