| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disallowing timedelta64+float promotion (to timedelta64) in all cases
(previously it was assymetric and "half allowed") meant that isclose,
allclose, np.ma.allclose, and assert_arrays_almost_equal (which uses
isclose), would stop work for timedelta64. Hardcoding that timedelta64
is passed on unmodified retains the old behaviour.
It may make sense to deprecate or change this behaviour in the future,
but for the 1.20 release, the behaviour should be as much unmodified
as possible.
Closes gh-18286
|
| |
|
|
|
|
|
| |
Space before colon, or missing colon in see-also,
typo in parameter names, casing in See Also.
|
|
|
|
|
|
|
|
|
|
|
|
| |
... or when the input isn't/cannot be a set. I left a few usages, e.g.
in random sampling, where "set" is reasonable as informal description of
an array as the order doesn't matter; however, for e.g. np.gradient the
order of the returned list is clearly important, so "set" is wrong.
Also some other minor doc edits noticed during the grepping: using
`shape` instead of `form` in `cov` is consistent with most other places;
the wording in `Polynomial.trim` now matches other methods on the same
class.
|
|\
| |
| | |
DOC: Replace {var} in docstrings type annotation with `scalar or None`.
|
| |
| |
| |
| | |
Closes #17944
|
|/
|
|
|
|
|
|
|
| |
This script is meant to be run stand-alone (and should probably
just not be at this place), but moving these down is cleaner in
any case.
The issue is that our "public API" tests import the module and
then modify the global state.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `__new__` method of `MaskedArray` has the parameter `**options`,
but it is not used. This means a mistyped parameter is silently ignored,
e.g. if I mistype the `mask` parameter like this, I don't get an error:
In [2]: m = np.ma.MaskedArray([1, 2, 3], maks=[0, 1, 0])
In [3]: m
Out[3]:
masked_array(data=[1, 2, 3],
mask=False,
fill_value=999999)
In this PR, I simply remove `**options` from the signature of
`MaskedArray.__new__`. This affected one test. That test was passing the
argument `shape=(0, 1, 2)` to the constructor of a subclass of `MaskedArray`,
but since any unknown keywords were silently ignored, that use of `shape` had
no effect. I replaced it with the positional argument `[[[]], [[]]]`, which
I believe has the effect that was originally intended with the use of the
`shape` argument.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Conversion of some strings to fstrings
* Remove spaces
* Update numpy/ma/mrecords.py
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* Update numpy/ma/tests/test_old_ma.py
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* Update numpy/ma/timer_comparison.py
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
Co-authored-by: Jakob <jakobjakobson13@posteo.de>
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
|
|
|
| |
Fix broken links in see also section of some ma functions.
|
|
|
| |
* fix runF2c exception
|
| |
|
|
|
| |
* DOC: Fix typos in versionchanged.
|
|\
| |
| | |
ENH: Add placeholder stubs for all sub-modules
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
|
|
| |
* DOC: fixing malformed documents
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
| |
* fix np.ma.core.doc_note
|
|\
| |
| | |
DOC: Warn about behavior of ptp with signed integers.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Add a warning to the docstrings of numpy.ma.MaskedArray.ptp and
numpy.ptp about a problem with signed integer arrays.
* Add an example to the the docstring of numpy.ptp that demonstrates
the issue and suggests a work-around.
* Add an "Examples" section to the docstring of MaskedArray.ptp
which includes the new example added to the docstring of numpy.ptp.
* Make the numbers in the basic example more interesting.
|
|/
|
|
|
|
|
|
|
| |
Fix for issue gh-15077. ma.core now checks and sets max and min
values for all float and complex dtypes. This fixes the max of a
masked array with a float16 or complex dtype returning inf
Builds on top of gh-15086.
Co-authored-by: William Jones <william.jones@physics.ox.ac.uk>
|
| |
|
|
|
|
|
| |
* Improve chained exception reporting
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
|
|
|
|
|
| |
* BUG: fix AttributeError on accessing object in nested MaskedArray
Co-authored-by: Rena Xu <renaxu@Renas-MacBook-Pro.local>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: vagrant <vagrant@vagrant.vm>
|
|
|
| |
Add missing closing brackets, script to generate the list in the PR gh-16051.
|
| |
|
|\
| |
| | |
DOC: document inconsistency between the shape of data and mask in numpy.ma
|
| |
| |
| |
| | |
Co-Authored-By: Tianxiang “Ronnie” Gao <tienhsiangkao@tamu.edu>
|
|\ \
| | |
| | | |
DEP: Deprecate ndarray.tostring()
|
| |/
| |
| |
| | |
The corresponding `array.array.tostring()` in the standard library has been deprecated in favor of `tobytes` since Python 3.1 (python/cpython@1ce3eb5c5b4830e69b21865e2d723e22749544e0).
|
| | |
|
| |
| |
| |
| |
| | |
types (#15816)
Cleanup from the dropping of python 2
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Fix and test conversion of masked element to string in fstring / string interpolation. See PEP 498 for string interpolation (aka fstrings) in Python 3.6 and above.
Fixes #15409.
Original PR gh-15410 by: Stefan Codrescu <ssmmcc1@gmail.com>
Co-authored-by: Stefan Codrescu <ssmmcc1@gmail.com>
Co-authored-by: Stefan <5tefan@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
|
|
|
| |
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
|
|
|
|
|
|
| |
* Cleanup unused imports (F401) of mostly standard Python modules,
or some internal but unlikely referenced modules
* Where internal imports are potentially used, mark with noqa
* Avoid redefinition of imports (F811)
|
|
|
| |
More sys.version cleanup.
|
|
|
|
|
|
|
|
|
| |
This PR uses simple cases of PEP 380 to rewrite:
for v in g:
yield v
into:
yield from <expr>
|
|
|
| |
Corrected past shortcomings
|
|
|
| |
Replace old strings format to fstrings
|
| |
|
|
|
|
|
|
|
| |
This replaces basestring with str except in
- tools/npy_tempita/
- numpy/compat/py3k.py
|
| |
|
|
|
|
| |
This implements NEP 34.
|
| |
|