| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`"Invalid version %r" % (1, 2)` would fail with `TypeError: not all arguments converted during string formatting`
The `Header is not a dictionary` error had a similar problem.
Fixed by changing this entire function to use `.format` in place of `%`, which does not have this gotcha.
Found using LGTM.com
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Adding 'strictly' to make the conditions to be met by the `xp` argument even more clear.
Following the suggestion in https://github.com/numpy/numpy/issues/10448#issuecomment-468302058 .
|
| | | |\ \ \ \
| | | | | | | |
| | | | | | | | |
ENH: Adding a count parameter to np.unpackbits
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Tests are included.
Couple of minor fixes:
- Fixed packbits/unpackbits docs to reflect proper keyword names
- Added .pytest_cache to .gitignore
|
| | | |\ \ \ \ \
| | | | |/ / / /
| | | |/| | | | |
ENH: Correct handling of infinities in np.interp (option B)
|
| | | | |/ / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Alternative to gh-12978, using a method that does not need a lot of special cases.
This is likely more robust in the face of overflow
Fixes gh-12951.
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The pickle module was being imported from numpy.core.numeric. It was
defined there in order to use pickle5 when available in Python3 and
cpickle in Python2. The numpy.compat module seems a better place for
that.
|
| | | |\ \ \
| | | | | | |
| | | | | | | |
DOC: Properly format Return section of ogrid Docstring,
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Without the newline and indent, the markup is not interpreted.
Note that in the see-also `np.lib.index_tricks.nd_grid` is reference but
not linked as it appear to not be autogenerated, but this is another
issue.
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* TST: Move test for negative stat_length
and extend coverage to all modes and more variations of a negative
stat_length.
* TST: Merge tests for pad_width in single class
* TST: Test behavior of pad's kwargs for all modes
* TST: Move test to TestReflect
Can be grouped with already existing test class checking the behavior
for the reflect mode.
* TST: Simplify regression test for object input
* TST: Move testing pad_width as ndarray
Can be grouped in class TestPadWidth as this test checks if an ndarray
is accepted as the value to pad_width
* TST: Remove faulty tests for pad_width's type
These test were ineffective. The TypeError raised in these test was not
actually due to pad_width receiving the wrong type but due to the
missing parameter mode.
Added missing type complex to the appropriate existing test checking for
pad_widths type behavior.
* TST: Move test for pad_width of zero
* TST: Move test for simple stat_length
* TST: Simplify classes with only one test
* TST: Add naive test for non-contiguous arrays
* MAINT: Don't import pad directly
Using np.pad instead of directly importing the function seems to be more
inline with other test modules.
* STY: Make class layout consistent in module
* TST: Fix match-string for missing pad mode error
The CLI fails due to error message containing a reference to
_pad_dispatcher() being returned instead of pad(). For some reason this
test passes when run locally.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Load uses pickle under the hood for object arrays, this is made
more visible in the documentation using a warning.
See also gh-12759
|
| | | |\ \ \
| | | | | | |
| | | | | | | |
DOC: remove python2-only methods, small cleanups
|
| | | | | | | |
|
| | | | | | | |
|
| | | |/ / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
- Always enable __array_function__ overrides.
- Remove special cases for Python 2 compatibility.
- Document these changes in 1.17.0-notes.rst.
It will be good to see ASV numbers to understand the performance implications
of these changes. If need be, we can speed up NumPy functions internally by
using non-dispatched functions (with ``.__wrapped__``).
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* add _nan_mask function and
associated unit tests; this function
is to be used to simplify reduction
operations involving np.nan elements
by using a mask with a ``where``
argument
|
| | | |\ \ \
| | | | | | |
| | | | | | | |
MAINT: Change the order of checking for locale file and import urllib modules
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
importing urllib modules in numpy._datasource.py to prevent the import in case the local file was found
See #12536
|
| | | |/ / /
| | | | | |
| | | | | | |
See issue https://github.com/numpy/numpy/issues/12742
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This implements cyclic support by adding `tp_traverse` to ufuns which may contain
a user provided object function (`np.frompyfunc`). Ufuncs that do not add this are not
added to the circular reference count tracking.
The ufunc does not need to implement `tp_clear` because it is an immutable object.
|
| | | | | | |
|
| | | | | | |
|
| | | |\ \ \
| | | | | | |
| | | | | | | |
BUG: polyval returned non-masked arrays for masked input.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This fix will preserve subtypes of ndarray when given as input (x)
to the polyval function. In particular, the results for masked
values of a masked array will be masked.
Fixes #2477.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* as requested by review in gh-12634,
the vast majority of docstring matplotlib
imports can be simplified to a single line
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* there is no longer any usage of "agg"
backend switching in our docstrings because
this backend is already activated in
the refguide_check machinery
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* added lib.recfunctions to refguide
PUBLIC_SUBMODULES, as the doctests
were otherwise not getting executed
* fixed a failing doctest in
recfunctions after above activation
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* restored regression comment in
numpy/core/defchararray.py
* fixed the dimensionality of the z
array in all() docstring in
numpy/core/fromnumeric.py; this isn't
detected because it is in-line with
variable memory addresses which are
tagged as variable for refguide
* byte_bounds() docstring adjusted
to reflect non-variable dtype
after reviewer requested removal
of complex dtype
* restore an original comment
in matmul docstring, as requested
by reviewer
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
any case now.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
* 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
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Turns out that this was relied upon downstream
We also add a setter for coeffs, so that augmented assignment does not both
change state and raise an exception suggesting state could not be changed.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously a single-field type would decay, which is undesirable.
The included test previously did not pass
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It's not clear that these have any visible effect, but we should be consistent with how we detect structured types.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This only affects arrays with `dtype([])`, but also follows the recommended way to check for structured arrays in our docs
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Previously passing `dtype=[], names=['a']` would append an extra field, even though `dtype=['a'], names=['b', 'c']` does not.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Also adjust the code to more clearly indicate what actually happens.
The behavior is identical before and after this patch.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Replacing empty tuples with `None` is a bad idea, and just results in an API that is hard to consume - especially since the behavior was never documented.
This affects `get_names`, `get_names_flat`, and `get_fieldstructure`.
|
| |_|/ / / /
|/| | | | |
| | | | | |
| | | | | | |
Previously this would fail with `ValueError: could not assign tuple of length 2 to structure with 3 fields.`, now it raises `NotImplementedError`.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ENH: allow arrays for start and stop in {lin,log,geom}space
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
And which failed with the change to linspace.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
(#12448)
* Review F401,F841,F842 flake8 errors (unused variables, imports)
* Review comments
* More tests in test_installed_npymath_ini
* Review comments
|
|/ / / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
* ENH: implement matmul on NDArrayOperatorsMixin
* MAINT: remove unnecessary pytest import
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
ENH: add back the multifield copy->view change
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Fixes #10409
Closes #11530
|