| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Currently, np.median is almost completely safe for subclasses, except
if the result is NaN. In that case, it assumes the result is a scalar
and substitutes a NaN with the right dtype. This PR fixes that, since
subclasses like astropy's Quantity generally use array scalars to
preserve subclass information such as the unit.
|
| |
|
|
|
|
| |
Co-Authored-By: Charles Harris <charlesr.harris@gmail.com>
|
|
|
|
| |
Parametrize w.r.t. the axis, array dimensionality and dtype
|
| |
|
|
|
|
|
|
| |
This makes the test more precise, and I ran into having to broaden
the xfails otherwise, because right now reduce-likes incorrectly
faile to give floating point warnings (and I was fixing that).
|
| |
|
|
|
|
| |
types
|
| |
|
| |
|
|\
| |
| | |
BUG: Ignore whitespaces while parsing gufunc signatures
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
MAINT: Proposal to expire three deprecated functions in numpy.lib.npyio
|
| | |
|
| | |
|
|\ \
| |/
|/| |
TST: Bump the python 3.10 test version from beta4 to rc1
|
| |
| |
| |
| | |
Broken in rc1 as of bpo-44524
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
* PERF: Speed-up common case of loadtxt()ing non-hex floats.
`python runtests.py --bench bench_io` reports a ~5-10% perf gain.
* TST: Add tests to check fromhex not called unintentionally.
Adds regression tests to check that the logic surrounding when
the default floatconv applies the fromhex conversion does not
change.
Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
|
|\
| |
| | |
API: Ensure np.vectorize outputs can be subclasses.
|
| |
| |
| |
| |
| |
| |
| | |
As is, this is true for the ufunc case, but not for the gufunc case,
even if the underlying function does produce a subclass. Given the
care taken to ensure inputs are kept as subclasses, this is almost
certainly an oversight, which is here corrected.
|
|/
|
|
|
| |
This PR adjusts np.unique for the edge cases where all values are nan.
Fixes gh-19300
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Unfortunately, this seems to cause some pain in pandas at least
to circumvent the warning.
Delaying may complicate the creation of ufuncs for strings, but
otherwise should not be a big problem. We have to make sure that
we can reimplement the change quickly though, it is an important
change in my opinion.
|
| |
|
|
|
|
| |
Test multiple dtypes in the `test_allnans` + a minor refactor
|
|\
| |
| | |
ENH: Phase unwrapping generalized to arbitrary interval size
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| |
| |
| | |
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
|
| | |
|
| |
| |
| |
| |
| | |
Reject NaN as a percentile/quantile value. Previously NaNs could pass the range check `0 <= q <= 1`.
closes #18830
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Subclass input of piecewise was already respected, so it seems more
logical to ensure the output is the same subclass (possibly just an
oversight that it was not done before).
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* benchmark bench_lib.Unique added
* extended test_unique_1d
* modify _unique1d
* extend test with return_index, return_inverse and return_counts parameters
* documentation updated
* Update numpy/lib/arraysetops.py
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* full coverage of nan types
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* added tests for the datetime like dtypes
* nan as vector of length 1
* use aux[-1] as nan, ..versionchanged, release note
* for complex arrays all NaN values are considered equivalent
Co-authored-by: filip_trojan <Tarantula2018>
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
|
| | |
|
|\ \
| | |
| | | |
DEP: Deprecate promotion of numbers and bool to string
|
| | | |
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| | |
* Add doc for deprecate_with_doc
Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
| |
| |
| |
| | |
The argument was renamed to `shape` and deprecated since NumPy 1.16,
so the deprecation can now be finalized.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* implement sliding_window_view #7753
Test cases are shown in the issue page.
* Add Example Cases
* Add step_size and N-dim support
* Add shape and step_size check. Remove warning.
* Remove shape default
Add step_size default's description.
* Give proper parameter name 'step'
* fix a parameter description mistake
* implement test function for sliding_window_view()
* implement test function for sliding_window_view()
* Fix according to @eric-wieser comments
* Change arange to ogrid in Examples
* remove np.squeeze on return line
* Clarify document to avoid parameter confusion.
* add `writable` and more explanation in docs
* resolve a write conflit
* fixes according to @seberg review
* resolve write hazard
* remove outdated docs.
* change referring according to @mattip.
change 'writeable' to 'readonly' as @seberg suggest.
remove 'step' as @eric-wieser request
* fix test minor error
* DOC: Grammar fixes
* STY: Add missing line break required by PEP8
* + Change readonly parameter to writeable.
+ Update writeable description.
+ Fix a few parameter checks.
+ Other minor improvements.
* Move to new api as proposed by @eric-wieser
- Change api to follow suggestion by Eric Wieser in
https://github.com/numpy/numpy/pull/10771#issuecomment-524715356
- Update docstring
- Add more tests
* Improve documentation
* Add sliding_window_view to documentation index
* Apply suggestions from code review
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Fix window shape check
* Add `sliding_window_view` to __all__
* Add tests for error cases
* Add array_function dispatching
* Change dispatcher argument defaults to None
* Simplify array function dispatching
* Added "np." prefix to doctests
* Split tests
* Improved docstring
* Add release note
* Fix docstring formatting
* Fix doctest
* Remove namespacing in documentation indexing
* Improve docstring
* Improved docstring
* Simplified docstring
* Improve docstring to make pseudo code stand out
* Improve docstring
* Add simple application example
* Correct release note
* Improve link with as_strides
* Add note about performance
* Tidy up main doc string
* Make language on performance warning stronger
* Bugfix: pass subok and writeable to as_strided
* Add writeable test
* Add subok test
* Change subok test to use custom array subclass instead of unsupported MaskedArray
* Add version added information
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Fanjin <fjzeng@ucsd.edu>
Co-authored-by: Fanjin Zeng <Fnjn@users.noreply.github.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: fanjin <fjzeng@outlook.com>
Closes gh-7753
|
| |
| |
| |
| |
| | |
Fixes gh-16354. Previously np.poly1d(z).coeffs.dtype would always
be np.float64 for zero array z, regardless of z's dtype.
|