| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Closes gh-22617
|
|
|
|
|
|
| |
`numpy.percentile()`, and `numpy.quantile()`.
Closes #22714, #22544.
|
|
|
|
|
|
|
|
| |
In some cases, the replacement is clearly not what is intended,
in those (where setup was called explicitly), I mostly renamed
`setup` to `_setup`.
The `test_ccompile_opt` is a bit confusing, so left it right now
(this will probably fail)
|
|
|
|
| |
This reverts commit 6b8d55e66e532d66e1701ad039b4cda306839b3f.
|
|
|
|
|
|
|
| |
Fixed issue that occurs when trying to take the median of a list of masked arrays.
Added a check to see if the input is a list then converts to a masked array.
See issue #10757 for more information.
Co-authored-by: jsclose <jsclose@umich.edu>
|
|
|
|
|
|
|
|
|
| |
(#21851)
The keepdims flag needs to be applied during the calculation of the sum of
the weights in np.average and np.ma.average. Not passing it causes weights
to broadcast incorrectly.
Fixes #21850
|
|
|
|
|
|
| |
The test used unintialized values, if NaN happened to be there
the test would fail (and generally, uninitialized values being used
in tests is bad, since it shows up in valgrind).
|
|\
| |
| | |
ENH: add ndenumerate specialization for masked arrays
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
If a weight is nan it behaves erratically. See the tests added.
|
|
|
|
|
| |
Closes #10438
Co-authored-by: mecopur <mecopur@outlook.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>
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
|
| |
This argument isn't used, and is confusing. (Small test added by
seberg)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
|
| |
Uses '_fromnxfunction_seq' just like 'vstack', 'hstack', etc.
Added release note to 1.15.0.
|
|
|
|
| |
Fixes gh-9233
|
|
|
|
|
|
|
| |
This is the case for x in {int, bool, str, float, complex, object}.
Using the np.{x} version is deceptive as it suggests that there is a
difference. This change doesn't affect any external behaviour. The
`long` type is missing in python 3, so np.long is still useful
|
| |
|
|
|
|
| |
Bare except is very rarely the right thing
|
| |
|
|
|
|
|
| |
Also adds a test for the disabled-by-design behaviour - this would return
raw matrices, not masked arrays
|
|
|
|
|
|
| |
This fixes gh-8331
Also update the docs for arraysetops to remove the outdated "1D" from the
description, which was already incorrect for np.unique.
|
|
|
|
| |
This fixes an omission where duplicate axes would only be detected when positive
|
|
|
|
|
| |
return nan as it did in 1.11 and same as normal median.
closes gh-8703
|
|
|
|
|
| |
This code was only here for Python 2.5 compatibility, but numpy requires 2.7
at minimum
|
|
|
|
|
|
|
| |
the masked nans which are equivalent to valid infs must be replaced
with infs earlier otherwise the inf is lost in the masked sum of the low
and high part.
Closes gh-8487
|
| |
|
|
|
|
|
|
| |
For such arrays, the sum of the two entries closest to the middle was
not divided by 2. Now fixed, with test cases adapted to ensure this
stays OK.
|
|
|
|
|
|
|
|
|
|
|
| |
This requires to base masked median on sort(endwith=False) as we need to
distinguish Inf and NaN.
Using Inf as filler element of the sort does not work as then the mask is not
guaranteed to be at the end.
Closes gh-8340
Also fixed 1d ma.median not handling np.inf correctly, the nd variant
was ok.
|
|
|
|
| |
and an axis argument. Add test.
|
| |
|
|
|
|
| |
they used to be called `..._w_...` and `..._wo_...`.
|
|
|
|
|
|
|
|
| |
In some places, just remove aparently unnecessary filters.
After this, all cases of ignore filters should be removed from
the tests, making testing (even multiple runs) normally fully
predictable.
|
| |
|