| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
(#16129)
* Improved one of the error messages for histogramdd.py as outlined in issue #15984
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| |
|
|
|
| |
Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>>
|
|
|
|
|
| |
* "bandwidth" -> "bin width"
* Minor grammatical fixes
|
|
|
|
|
|
|
| |
This replaces basestring with str except in
- tools/npy_tempita/
- numpy/compat/py3k.py
|
| |
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An input such as
np.histogram(np.array([-2, 0, 127], dtype=np.int8), bins="auto")
would raise the exception
ValueError: Number of samples, -1, must be non-negative.
The problem was that the peak-to-peak value for the input array was
computed with the `ptp` method, which returned negative values for
signed integer arrays when the actual value was more than the
maximum signed value of the array's data type.
The fix is to use a peak-to-peak function that returns an
unsigned value for signed integer arrays.
Closes gh-14379.
|
| |
|
|
|
|
| |
fixes GH-13728
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Increment stacklevel for warnings to account for NEP-18 overrides
For NumPy functions that make use of `__array_function__`, the appropriate the
stack level for warnings should generally be increased by 1 to account for
the override function defined in numpy.core.overrides.
Fixes GH-13329
* Update numpy/lib/type_check.py
Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
|
|
|
|
| |
bins only accepts lowercase strings, but the notes are capitalized.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes GH-12271
Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to
``'numpy'``, or appears in an explicit whitelist of undocumented functions and
exported bulitins. These should eventually be documented or removed.
I also identified a handful of functions for which I had accidentally not setup
dispatch for with ``__array_function__`` before, because they were listed under
"ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in
trusting code comments :).
|
|\
| |
| | |
ENH: __array_function__ support for np.lib, part 1/2
|
| |
| |
| |
| | |
np.lib.arraypad through np.lib.nanfunctions
|
|/
|
|
|
|
|
|
|
|
|
| |
Convert bool to uint at start, rather than attempt a XOR
Only check type against np.bool_
Refactor warnings check
|
|\
| |
| | |
BUG: Avoid signed overflow in histogram
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When dividing the range between first and last, the formula `(x - first) / (last - first)` is used, where `last >= first`
This falls apart if the types of these variables are signed integers, in which case overflow can occur.
The solution is to force the subtraction result to be unsigned.
This is a regression in 1.15.0
|
|\ \
| | |
| | | |
ENH: Add density argument to histogramdd.
|
| |/
| |
| |
| | |
Fixes gh-4371
|
|\ \
| | |
| | | |
BUG: Fix incorrect deprecation logic for histogram(normed=...) (master)
|
| | |
| | |
| | |
| | | |
Fixes #11426, which was introduced in #11323 and #11352
|
|\ \ \
| |/ /
|/| | |
DOC: Clarify requirement that histogram bins are monotonic.
|
| |/
| |
| |
| | |
Close gh-631
|
|/
|
|
| |
Documenting this argument at such length gives it authenticity it does not deserve.
|
|
|
|
| |
This is due to gh-11022.
|
|
|
|
|
|
|
|
|
|
| |
Previously a fuzzy rounded comparison was used for the rightmost bin of histogramdd.
It's not clear why this was done, and it resulted in surprising behavior.
This also removes the restriction that bin edges must be floats, and allows integer arrays to be passed (and returned)
Fixes gh-10864
|
| |
|
|
|
| |
Now falls back on sturges estimator when the IQR is zero
|
|
|
|
| |
Creates an alias instead
|
|
|
|
|
|
| |
array
The result is left as a float, even though it no longer needs to be, as this commit aims not to change behavior.
|
| |
|
| |
|
| |
|
|
|
|
| |
len(xy) == N, and we already checked if N == 0 above.
|
| |
|
|
|
|
| |
`x1d[nonzero(mask1d)[0]]` is just a less readable way to spell `x1d[mask1d]`
|
|
|
|
| |
Fixes gh-8531
|
| |
|
|
|
|
| |
This also adds support for inferring the range along a subset of the axes, rather than an all or nothing approach.
|
|
|
|
|
|
| |
Previously gave `ValueError: object too deep for desired array` from an internal call
This also adds support for 0d array bincounts
|
|
|
|
|
| |
This also switches to doing comparisons rather than subtractions, for consistency with np.histogram.
That change is not strictly necessary here as the arguments are not unsigned integer types (unlike in np.histogram), but it would nice to support integer bins in future.
|
| |
|
| |
|