| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
This PR uses simple cases of PEP 380 to rewrite:
for v in g:
yield v
into:
yield from <expr>
|
| |
|
|
|
|
| |
Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
|
|
|
|
|
|
|
| |
Inheriting from object was necessary for Python 2 compatibility to use
new-style classes. In Python 3, this is unnecessary as there are no
old-style classes.
Dropping the object is more idiomatic Python.
|
|
|
|
|
| |
As numpy is Python 3 only, these import statements are now unnecessary
and don't alter runtime behavior.
|
|
|
|
|
|
|
| |
In numpy.gradient, convert integer array inputs to float64 to avoid
unwanted modular arithmetic.
Closes gh-15207.
|
|
|
|
|
|
| |
* Remove conditional imports that handled Python 2.
* Remove unused imports.
* Partial PEP 8 clean up.
|
|
|
|
|
|
| |
Use `ddof = 1` instead of 9, and remove a confusing comment.
Closes gh-15010.
|
|\
| |
| | |
MAINT: reduce the number of doc build warnings
|
| | |
|
|/
|
|
|
| |
Address gh-13919 by adding to documentation that xp cannot contain NaN because its input is required to be sorted.
Closes gh-13919
|
|
|
|
|
|
|
| |
The documentation currently states "It works in 2-D as well"
with attached example not correct.
closes #14466
|
| |
|
| |
|
|
|
|
|
| |
Also removed the incorrect comment from the docstring of `numpy.ma.average`
about the imaginary part of `weights` being ignored.
|
|
|
| |
I think it should be like that (maybe I am mistaken).
|
|
|
|
|
|
|
|
|
|
| |
For array likes supporting UFuncs, `np.abs` would return an array-like,
and this is currently not compatible with the use of `np.piecewise`.
The simplest fix seems to be to just call asanyarray (which piecewise
calls anyway on the array) beforehand. This way we ensure the conditions
are also an array.
Fixes gh-13894
|
| |
|
| |
|
|
|
|
|
|
| |
* DOC, MAINT: Misc. typo fixes
Found via `codespell`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|\
| |
| | |
ENH: Added clearer exception for np.diff on 0-dimensional ndarray
|
| | |
|
| |
| |
| |
| | |
With true division available, using `.0` to convert integers to floats offers no value, and harms compatibility with precise rational types.
|
| | |
|
| |
| |
| |
| | |
Addresses review comment by @eric-wieser.
|
|/
|
|
| |
2 for polyfit rankwarning, 2 for divide by zero in log10.
|
| |
|
| |
|
|
|
|
| |
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 .
|
|
|
| |
See issue https://github.com/numpy/numpy/issues/12742
|
| |
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
* 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 :).
|
| |
|
|
|
|
| |
np.lib.arraypad through np.lib.nanfunctions
|
| |
|
| |
|
|
|
|
| |
"an single" typo pointed out by keithbriggs - see gh-11730.
|
|\
| |
| | |
DOC: Document average return type
|
| | |
|
| |
| |
| |
| | |
* fixed grammatical mistakes
* added a space before Example
|
| |
| |
| |
| | |
* further elaborated the return variable types
* fixed the space error
|