summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* ENH: add new function `_opt_info()` to utils provides the optimization info ↵Sayed Adel2021-04-221-9/+35
| | | | of NumPy build
* DOC: Add blank line before section.Matthias Bussonnier2021-04-161-0/+1
| | | | Otherwise Numpydoc does not see the section.
* Merge pull request #18379 from anntzer/mndSebastian Berg2021-02-091-2/+2
|\ | | | | DOC: Fix docstring of _median_nancheck.
| * DOC: Fix docstring of _median_nancheck.Antony Lee2021-02-091-2/+2
| | | | | | | | | | | | _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.
* | MAINT: Avoid moveaxis overhead in median.Antony Lee2021-02-061-2/+1
|/ | | | | | 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)'`
* DOC: Doc for deprecate_with_doc (#17852)kumudlakara2020-12-171-1/+26
| | | | | | * 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>
* MAINT: Do not emit empty Methods heading in np.info (#17498)Steve Joachim2020-10-101-4/+4
| | | | | 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.
* Merge pull request #16349 from larsoner/depCharles Harris2020-05-231-0/+2
|\ | | | | BUG: Indentation for docstrings
| * BUG: Indentation for docstringsEric Larson2020-05-221-0/+2
| |
* | BUG: np.info does not show keyword-only argumentsEric Wieser2020-05-191-35/+7
|/ | | | | | Using inspect.signature instead of `np.compat.getargspec` solves this problem. `inspect.signature` also handles stripping the `self` argument of methods for us.
* MAINT: remove useless `global` statementsEric Wieser2020-03-181-1/+0
| | | | | | | `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.
* MAINT: Remove sys.version checks (gh-#15373)Seth Troisi2020-01-281-35/+0
| | | More sys.version cleanup.
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-201-5/+1
|
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | 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.
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* MAINT: Simplify lookfor functionAlex Henrie2019-09-151-6/+1
|
* DEP: Deprecate class `SafeEval` (#14335)Maxwell Aladago2019-08-241-87/+0
| | | | * Deprecate class SafeEval
* fix testskritisingh12019-06-071-3/+0
|
* Fix testskritisingh12019-04-101-4/+0
|
* Issue deprecation warningskritisingh12019-04-051-0/+6
|
* BUG: Fix help() formatting for deprecated functions.wrwrwr2019-02-171-0/+29
| | | | Closes #8058.
* ENH: remove "Invalid value" warnings from median, percentilemattip2019-01-061-5/+0
|
* MAINT: include recfunctions moduleTyler Reddy2018-12-141-0/+1
| | | | | | | | | * added lib.recfunctions to refguide PUBLIC_SUBMODULES, as the doctests were otherwise not getting executed * fixed a failing doctest in recfunctions after above activation
* MAINT: addressing review commentsTyler Reddy2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | * 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
* MAINT: address several reviewer commentsTyler Reddy2018-12-141-2/+2
|
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-9/+6
| | | | | | | | * 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
* DEV remove shim added in 1.4mattip2018-11-141-7/+0
|
* ENH: set correct __module__ for objects in numpy's public APIStephan Hoyer2018-11-131-0/+5
| | | | | | | | | | | | | 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 :).
* MAINT: remove redundant importsEmil Hessman2018-09-301-1/+0
|
* HTTP -> HTTPS, and other linkrot fixesMike Toews2018-06-161-3/+3
|
* More misc. typosluz.paz2018-01-041-1/+1
| | | Found via `codespell`
* MAINT: Use moveaxis instead of rollaxis internally (#9475)Nico Schlömer2017-08-101-1/+1
| | | | | Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.
* BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-031-2/+2
| | | | Bare except is very rarely the right thing
* ENH: Spelling fixesVille Skyttä2017-05-091-1/+1
|
* BUG: handle unmasked NaN in ma.median like normal medianJulian Taylor2016-12-121-0/+46
| | | | | | | | | | | 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.
* MAINT: Other cleanup Python < 2.7 and Python3 < 3.4Alexandr Shadchin2016-12-091-8/+2
|
* DOC: change Numpy to NumPy in dosctrings and commentsPierre de Buyl2016-09-061-3/+3
| | | | The strings in error messages were left untouched
* ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-021-3/+3
|
* DOC: Fix some incorrect RST definition listsEndolith2016-05-111-2/+2
|
* MAINT: Use numpy versions of getargspec, formatargspec.Charles Harris2015-07-241-7/+10
| | | | | 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.
* Merge pull request #5953 from yarikoptic/bf/guard-getmembersCharles Harris2015-06-271-1/+1
|\ | | | | BF: do not crash lookfor if inspection fails - catch any Exception
| * BF: do not crash lookfor if inspection fails - catch any ExceptionYaroslav Halchenko2015-06-081-1/+1
| |
* | MAINT: Mark deprecation warning with a date and Numpy version.Charles Harris2015-06-211-0/+1
|/ | | | | | 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.
* DEP: Deprecate SafeEval class.Charles Harris2014-10-151-0/+6
| | | | The class is no longer used in numpy and was never exported.
* MAINT: Use ast.literal_eval in safe_eval.Charles Harris2014-10-151-15/+3
| | | | | This does what is needed now that the compiler module is no longer used.
* MAINT: Remove use of compiler module.Charles Harris2014-10-121-98/+46
| | | | | | 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.
* STY: Make files in numpy/lib PEP8 compliant.Charles Harris2014-07-311-49/+81
| | | | The rules enforced are the same as those used for scipy.
* MAINT: Fixes for problems in numpy/lib revealed by pyflakes.Charles Harris2014-07-311-4/+4
| | | | | | 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.
* FIX: missing asarray import in numpy.libs.utilsOlivier Grisel2014-03-191-1/+1
|
* BUG: fix ValueError for byte_bounds() on datetime arraymosessky2014-03-021-2/+3
| | | | close gh-4345