| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
(#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
|
|
|
| |
Co-authored-by: Robert Kern <robert.kern@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The first lines of the sinc docstring did not mention the behavior
when the argument is zero, and gave the impression that the function is
defined as the quotient between a sine and its argument everywhere. That
information was instead relegated to the "Notes" section. I found this
issue while navigating the documentation for jax.numpy.sinc, which
inherits those few lines. I think it is important to document not only
the value of the function at zero, but also that it make sinc a smooth
function. This connects better with some of the other routes used to
introduce sinc (e.g. as a Taylor series). I have tried to implement
the conclusions of the discussion around Issue #21538, keeping the
description close to the actual implementation and avoiding my original
suggestion of introducing the function as a limit.
|
| |
|
|\
| |
| | |
DOC: Add space after argument name
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
MAINT: extend delete single value optimization
|
| | |
|
| |\ |
|
| | |
| | |
| | | |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| | |
| | |
| | |
| | |
| | | |
Allow arrays of shape (1,) for delete's obj parameter to utilize the
optimization for a single value. See #16685.
|
| | | |
|
| | | |
|
| |/
|/|
| |
| |
| | |
coordinate was misspelled in a comment in the example code
[ci skip]
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| |
| |
| |
| |
| |
| |
| | |
Mainly fixes the method list slightly, tones down the warning a
bit and fixes the link to the paper (I did not realize that the
link failed to work due only because the reference was missing
from nanquantile/nanpercentile).
|
| |
| |
| |
| | |
Co-authored-by: abel <aoun@cerfacs.fr>
|
| |
| |
| |
| |
| | |
Apparently, sphinx does not resolve references to footnotes from
parameter descriptions.
|
| | |
|
| |
| |
| |
| |
| | |
Also, the closest-observation did not correctly support multiple
quantiles calculated at the same time (broadcasting error).
|
| | |
|
| |
| |
| |
| |
| |
| | |
For method 7 of H&F, using `(n - 1) * quantiles`
instead of the usual method gives a more accurate
result.
|
| | |
|
| |
| |
| |
| |
| |
| | |
Avoiding the unnecessary calls to moveaxis() speed up
`np.quantile(x, .5)` (`x = np.random.rand(1000)`) by ~10% (although
there's a lot of variability) for me.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Also added unit test for it.
|
| |
| |
| |
| | |
Also removed unused imports
|
| |
| |
| |
| |
| | |
- some changes were unrelated to the PR and have been reverted, including, renaming and moving the logic around.
- Also renamed _quantile_ureduce_func to its original name
|
| |
| |
| |
| |
| | |
Hopefully fix the docstrings of percentile, nanpercentile,
quantile, and nanquantile so that CircleCI passes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Added the missing linear interpolation methods.
- Updated the existing unit tests.
- Added pytest.mark.xfail for boolean arrays
See
- https://github.com/numpy/numpy/pull/19857#issuecomment-919258693
- https://github.com/numpy/numpy/issues/19154
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
When `insert` is given a single out-of-bounds index in a
list, e.g.
np.insert([0, 1, 2], [99], [3, 4]) # 99 is out of bounds
a TypeError was being raised because of a bug in the formatting
of the message.
Before this change, the error is
TypeError: %i format: a number is required, not list
After, we get the expected
IndexError: index [99] is out of bounds for axis 0 with size 3
|
| | |
| | |
| | |
| | | |
Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
|
| |\ \
| | | |
| | | | |
MAINT: LGTM.com recommendations
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Import of 'histogram' is not used.
Import of 'histogramdd' is not used.
Import of 'textwrap' is not used.
|
| | | | |
|
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | | |
precision float dtypes
|
| | |
| | |
| | | |
Co-authored-by: Mukulika <60316606+Mukulikaa@users.noreply.github.com>
|
| | | |
|
| | | |
|
| | | |
|
|/ / |
|
| | |
|
| |
| |
| |
| |
| | |
* Add explanation of a spare mesh grid.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|