summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
Commit message (Collapse)AuthorAgeFilesLines
* 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
* BUG: Disable check for oldstyle classes in python3Joseph Martinot-Lagarde2013-10-091-1/+4
| | | | Fixes gh-2561
* DEP, MAINT: Copy info function from numarray.Charles Harris2013-09-231-47/+55
| | | | | | The numarray info function is called by lib.utils.info. Rename it to _info and copy into lib/utils.py. Some modifications are made as it only needs to support numpy.
* ENH: add support for Python 3.4 ast.NameConstantChristoph Gohlke2013-09-081-0/+3
|
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-10/+10
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* MAINT: Remove uses of the WarningManager class.Charles Harris2013-07-121-6/+2
| | | | | | | | | | | | WarningManager was a workaround for the lack of the with statement in Python versions < 2.6. As those versions are no longer supported it can be removed. Deprecation notes are added to WarningManager and WarningMessage, but to avoid a cascade of messages in third party apps, no warnings are raised at this time, that can be done later. Closes #3519.
* ENH: improve performance of byte_bounds for continous arraysJulian Taylor2013-05-281-2/+1
|
* ENH: implement may_share_memory in CJulian Taylor2013-05-281-31/+1
| | | | | | | | | memmap needs to call it in __array_finalize__ to determine if it can drop the references on copies. The python version if may_share_memory caused significant slowdowns when slicing these maps. closes gh-3364