| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
| |
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
|
| |
Relates to ticket #19077
|
|
|
|
| |
of NumPy build
|
|
|
|
| |
Otherwise Numpydoc does not see the section.
|
|\
| |
| | |
DOC: Fix docstring of _median_nancheck.
|
| |
| |
| |
| |
| |
| | |
_median_nancheck doesn't support axis being anything other than an
integer (otherwise the call to moveaxis would fail). This is fine,
because median goes through _ureduce for multi-axis support.
|
|/
|
|
|
|
| |
This change speeds up taking the median of 1001 floats by ~20%, as
measured by
`python -mtimeit -s 'import numpy as np; x = np.random.randn(1001)' -- 'np.median(x)'`
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
| |
Fixes the incompatible type comparison found in #17490.
This also corrects the logic to not print the heading when only private/magic methods are present.
|
|\
| |
| | |
BUG: Indentation for docstrings
|
| | |
|
|/
|
|
|
|
| |
Using inspect.signature instead of `np.compat.getargspec` solves this problem.
`inspect.signature` also handles stripping the `self` argument of methods for us.
|
|
|
|
|
|
|
| |
`global` is only needed if a variable appears on the left of an assignment.
These variables do not.
Most suffer from the misconception that `var[x] = y` requires `var` to be global, but it does not.
|
|
|
| |
More sys.version cleanup.
|
| |
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
* Deprecate class SafeEval
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #8058.
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
| |
* 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 :).
|
| |
|
| |
|
|
|
| |
Found via `codespell`
|
|
|
|
|
| |
Also add a hint to the documentation advising the use of moveaxis over rollaxis.
Tests for rollaxis are left alone.
|
|
|
|
| |
Bare except is very rarely the right thing
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This requires to base masked median on sort(endwith=False) as we need to
distinguish Inf and NaN.
Using Inf as filler element of the sort does not work as then the mask is not
guaranteed to be at the end.
Closes gh-8340
Also fixed 1d ma.median not handling np.inf correctly, the nd variant
was ok.
|
| |
|
|
|
|
| |
The strings in error messages were left untouched
|
| |
|
| |
|
|
|
|
|
| |
Both of these functions will be removed in Python 3.6 and were deprecated
in 3.5. The numpy versions are not full versions, but hopefully suffice.
|
|\
| |
| | |
BF: do not crash lookfor if inspection fails - catch any Exception
|
| | |
|
|/
|
|
|
|
| |
This is to make it easier to find and remove deprecated features.
It would be a good idea if all deprecations were made with similar
comments.
|
|
|
|
| |
The class is no longer used in numpy and was never exported.
|
|
|
|
|
| |
This does what is needed now that the compiler module is no longer
used.
|
|
|
|
|
|
| |
The ast module was added in Python 2.6 as a replacement for the compiler
module. As we no longer support Python versions < 2.6, all uses of the
compiler module can be removed.
|
|
|
|
| |
The rules enforced are the same as those used for scipy.
|
|
|
|
|
|
| |
Some of those problems look like potential coding errors. In those
cases a Fixme comment was made and the offending code, usually an
unused variable, was commented out.
|