| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
* ENH: pathlib support for fromfile(), .tofile() and .dump()
|
|\
| |
| | |
ENH: Pass input strides and dimensions by pointer to const
|
| |
| |
| |
| |
| |
| |
| | |
This makes it possible to call these functions with constant data.
It also bakes the contract that the data passed via these pointers will not be changed into the function signatures.
This is backwards compatible, because T* can always be passed to a function expecting T const*.
|
|/
|
| |
* ENH: add offset keyword arg to numpy.fromfile()
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
| |
Currently, a field specified as `[(name, dtype, 1)]` is interpreted as
a scalar field (i.e., the same as `[(name, dtype)]` or `[(name, dtype,
()]`). This now raises a FutureWarning; in a future version, it will
be interpreted as a shape-(1,) field, i.e. the same as `[(name, dtype,
(1,))]` (consistently with `[(name, dtype, n)]` with `n>1`, which is
already equivalent to `[(name, dtype, (n,)]`).
|
|\
| |
| | |
BLD: Add libflame as a LAPACK back-end
|
| |
| |
| |
| |
| |
| |
| | |
Now libflame may be used as a LAPACK back-end.
libflame requires an external BLAS so one has to
also have this enabled.
Also added release notes for NPY_*_ORDER and libFLAME.
|
|\ \
| | |
| | | |
BUG,DEP: Fix writeable flag setting for arrays without base
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This also deprecates setting a non-writeable array to writeable if
that array does not own its data (and has no base object to check if
the memory may be writeable). (Deprecation on Python side only)
Closes gh-481
|
|\ \ |
|
| |\ \
| | | |
| | | | |
ENH: Support object arrays in matmul
|
| | | | |
|
| | | | |
|
| |\ \ \
| | | | |
| | | | | |
API: Make MaskedArray.mask return a view, rather than the underlying mask
|
| | | |/
| | |/|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This prevents consumers from reshaping the mask in place, which breaks things
As a result, `x.mask is x.mask` returns `False`, but this was already true of `x.data is x.data`.
May also be related to gh-10270
|
| |\ \ \
| | | | |
| | | | | |
ENH: Add 'bitorder' keyword to packbits, unpackbits
|
| | |/ / |
|
| |\ \ \
| | | | |
| | | | | |
ENH: Implement radix sort
|
| | |/ / |
|
| |/ /
| | |
| | |
| | | |
Ensure log(0.0) doesn't produce inf/nan values when generating random values
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
This version encodes the dtype as utf8 instead of latin1.
Unfortunately we need to create a new version to make this change, because we did not limit ourselves to ASCII in versions 1 and 2.
Fixes gh-7391
|
|\ \
| | |
| | | |
MAINT: better MemoryError message (#13225)
|
| | | |
|
|\ \ \
| | | |
| | | | |
ENH: Add support for Fraction to percentile and quantile
|
| | | |
| | | |
| | | |
| | | | |
With true division available, using `.0` to convert integers to floats offers no value, and harms compatibility with precise rational types.
|
|\ \ \ \
| | | | |
| | | | | |
BUG: Fix structured_to_unstructured on single-field types
|
| |/ / / |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* ENH: Added shape argument to *_like() array creation functions
* ENH: C backend adjustments for shape argument on *_like()
* TST: Added test for shape argument in *_like() functions
* ENH: Added PyArray_NewLikeArrayWithShape()
This change maintains backwards compatibility, rather than passing new
arguments to PyArray_NewLikeArray().
* BUG: Fix for PyArray_NewLikeArrayWithShape strides and ndim == 0
Arrays created with new shapes should not take into consideration the original
array's stride, and ndim == 0 should not be a case to ignore a new shape, as
the caller may request a 0d array.
* REL: Updates for C-API, version 1.17.x
* Add comments to cversions.txt (new PyArray_NewLikeArrayWithShape function)
* Increment C_API_VERSION to 1.17 in setup_common.py
* Revert "REL: Updates for C-API, version 1.17.x"
This reverts commit 807f512ebeb7797ad374d845e41015948afcc708.
* Revert exposing PyArray_NewLikeArrayWithShape on C-API
* DOC: fix versionadded for *_like() shape argument
* STY: add missing spaces in array initializers
* ENH: empty_like raises ValueError
This occurs when shape is defined and number of dimensions match but
order is 'K'.
* TST: test for exception of *_like() functions
* DOC: release note for shape argument in *_like() functions
* DOC: fix *_like() documentation on raises
* BUG: *_like() raises for non-C/F-layout arrays
* TST: change *_like() shapes to prevent NPY_RELAXED_STRIDE_DEBUG=1 failure
* Move empty_like() exception to C implementation
* Update *_like() ValueError documentation
* Rearrange stride computation for *_like() if new shape and order='K'
* Change handling of order= for *_like()
- If order='K' try to keep, otherwise, order='C' is implied
- Do not raise ValueError anymore
* Fix *_like() tests
|
|\ \ \
| | | |
| | | | |
BUG/ENH: Make floor, ceil, and trunc call the matching special methods
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously `np.ceil` would call `o.ceil()` on each element of an object array.
This is inconsistent with the builtin python way of handling this, calling `o.__ceil__()`.
This changes these three functions to use the corresponding functions in the `math` module, which do the special method lookup.
As a result, they now work on arrays of `Fraction` and `Decimal` objects.
|
| | |
| | |
| | |
| | |
| | |
| | | |
- Add 1.16.3 release notes
- Add 1.16.3 changelog
- Update mailmap
|
| | | |
|
|\ \ \
| | | |
| | | | |
ENH: Implement `np.floating.as_integer_ratio`
|
| | | |
| | | |
| | | |
| | | | |
This matches the builtin `float.as_integer_ratio` and (in recent python versions) `int.as_integer_ratio`.
|
|\ \ \ \
| |_|/ /
|/| | | |
ENH: `isfinite` support for `datetime64` and `timedelta64`
|
| |\ \ \
| | |/ / |
|
| | |/
| |/|
| | |
| | | |
`datetime64` and `timedelta64`
|
| | |
| | |
| | |
| | |
| | |
| | | |
a partial mitigation of #12759.
see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
|
| |/
|/|
| |
| |
| |
| |
| |
| | |
This is mentioned in the release notes, so probably should be discoverable.
Change those mentions to links.
Fix the docstring to not cause sphinx to emit warnings.
|
| | |
|
|/
|
| |
Update release notes to include "nan_to_num" information.
|
|\
| |
| | |
ENH: Create boolean and integer ufuncs for isnan, isinf, and isfinite.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, boolean values would be routed through the half implementations of
these functions, which added considerable overhead. Creating specialized
ufuncs improves performance by ~250x
Additionally, enable autovectorization of new isnan, isinf, and isfinite ufuncs.
|
| |
| |
| | |
Fixes #9293, #6272
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* ENH: Add support for constant, edge, linear_ramp to new numpy.pad
Passes unit tests:
- TestConstant
- TestEdge
- TestZeroPadWidth
- TestLegacyVectorFunction
- TestNdarrayPadWidth
- TestUnicodeInput
- TestLinearRamp
* MAINT: Simplify diff / change order of functions
* MAINT: Revert to old handling of keyword-only arguments
* ENH: Add support for stat modes
* ENH: Add support for "reflect" mode
* MAINT: Remove _slice_column
* ENH: Add support for "symmetric" mode
* MAINT: Simplify mode "linear_ramp"
Creating the linear ramp as an array with 1-sized dimensions except
for the one given by `axis` allows implicit broadcasting to the needed
shape. This seems to be even a little bit faster that doing this by hand
and allows the simplicifaction of the algorithm.
Note: Profiling and optimization will be done again at a later stage.
* MAINT: Reorder arguments of a sum and fix typo
Addresses feedback raised in PR.
* ENH: Add support for "wrap" mode
This completes the first draft of the complete rewrite meaning all unit
tests should pass from this commit onwards.
* MAINT: Merge functions for "reflect" and "symmetric" mode
The set functions were nearly the same, apart from some index offsets.
Merging them reduces code duplication.
* TST: Add regression test for gh-11216
The rewrite in past commits fixed this bug.
* BUG: Fix edge case for _set_wrap_both when pad_amt contains 0.
And include test to protect against regression.
* MAINT: Simplify and optimize pad modes
Major changes & goals:
Don't deal with pad area in the front and back separately. This
modularity isn't needed and makes handling of the right edge more
awkward. All modes now deal with the left and right side at the same
time.
Move the creation of the linear ramps fully to its own function which
behaves like a vectorized version of linspace.
Separate calculation and application of the pad area where possible.
This means that _get_edges can be reused for _get_linear_ramps.
Combine _normalize_shape and _validate_lengths in a single function
which should handles common cases faster.
Add new mode "empty" which leaves the padded areas undefined.
Add documentation where it was missing.
* TST: Don't use np.empty in unit tests
* MAINT: Reorder workflow in numpy.pad and deal with empty dimensions
Only modes "constant" and "empty" can extend dimensions of size 0. Deal
with this edge case gracefully for all other modes either fail or
return empty array with padded non-zero dimensions.
Handle default values closer to their actual usage. And validate
keyword arguments that must be numbers.
* MAINT: Add small tweaks to control flow and documentation
* BUG: Ensure wrap mode works if right_pad is 0
* ENH: Use reduced region of interest for iterative padding
When padding multiple dimensions iteratively corner values are
unnecessarily overwritten multiple times. This function reduces the
working area for the first dimensions so that corners are excluded.
* MAINT: Restore original argument order in _slice_at_axis
* MAINT: Keep original error message of broadcast_to
* MAINT: Restore old behavior for non-number end_values.
* BENCH: Make the pad benchmark pagefault in setup
* ENH/TST: Preserve memory layout (order) of the input array
and add appropriate unit test.
* STY: Revert cosmetical changes to reduce diff
* MAINT: Pin dtype to float64 for np.pad's benchmarks
* MAINT: Remove redundant code path in _view_roi
* MAINT/TST: Provide proper error message for unsupported modes
and add appropriate unit test.
* STY: Keep docstrings consistent and fix typo.
* MAINT: Simplify logical workflow in pad
* MAINT: Remove dtype argument from _linear_ramp
The responsibility of rounding (but without type conversion) is not
really need in _linear_ramp and only makes it a little bit harder to
reason about.
* DOC: Add version tag to new argument "empty"
* MAINT: Default to C-order for padded arrays
unless the input is F-contiguous.
* MAINT: Name slice of original area consistently
for all arguments describing the same thing.
* STY: Reduce vertical space
* MAINT: Remove shape argument from _slice_at_axis
Simplifies calls to this function and the function itself.
Using `(...,)` instead should keep this unambiguous. This change is not
compatible with Python 2.7 which doesn't support this syntax outside
sequence slicing. If that is wanted one could use `(Ellipsis,)` instead.
* TST: Test if end_values of linear_ramp are exact
which was not given in the old implementation `_arange_ndarray`.
* DOC: Improve comments and wrap long line
* MAINT: Refactor index_pair to width_pair
Calling the right value an index is just plain wrong as it can't be used
as such.
* MAINT: Make _linear_ramp compatible with size=0
* MAINT: Don't rely on negative indices for slicing
Calculating the proper positive index of the start of the right pad area
makes it possible to omit the extra code paths for a width of 0. This
should make the code easier to reason about.
* MAINT: Skip calculation of right_stat if identical
If the input area for both sides is the same we don't need to calculate
it twice.
* TST: Adapt tests from gh-12789 to rewrite of pad
* TST: Add tests for mode "empty"
* TST: Test dtype persistence for all modes
* TST: Test exception for unsupported modes
* TST: Test repeated wrapping for each side
individually. Reaches some only partially covered if-statments in
_set_wrap_both.
* TST: Test padding of empty dimension with constant
* TST: Test if end_values of linear_ramp are exact
which was not given in the old implementation `_arange_ndarray`. (Was
accidentally overwritten during the last merge).
* TST: Test persistence of memory layout
Adapted from an older commit 3ac4d2a1b9b258d65f8d2b5f8f25f88e3a0e8f58
which was accidentally overwritten during the last merge.
* MAINT: Simplify branching in _set_reflect_both
Reduce branching and try to make the calculation of the various indices
easier to understand.
* TST: Parametrize TestConditionalShortcuts class
* TST: Test empty dimension padding for all modes
* TST: Keep test parametrization ordered
Keep parametrization ordered, otherwise pytest-xdist might believe that
different tests were collected during parallelization causing test
failures.
* DOC: Describe performance improvement of np.pad
as well as the new mode "empty" in release notes (see gh-11358).
* DOC: Remove outdated / misleading notes
These notes are badly worded or actually misleading. For a better
explanation on how these functions work have a look at the context and
comments just above the lines calling these functions.
|
| | |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
I've found that automatic merges seem to go better if there are no blank lines between headers and the content below them.
This is consistent with the older release notes anyway
|
| |/ |
|