summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
| * DEP: Do not allow "abstract" dtype conversion/creationSebastian Berg2020-02-063-11/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These dtypes do not really make sense as instances. We can (somewhat) reasonably define np.dtype(np.int64) as the default (machine endianess) int64. (Arguably, it is unclear that `np.array(arr_of_>f8, dtype="f")` should return arr_of_<f8, but that would be very noisy!) However, `np.integer` as equivalent to long, is not well defined. Similarly, `dtype=Decimal` may be neat to spell `dtype=object` when you intend to put Decimal objects into the array. But it is misleading, since there is no special meaning to it at this time. The biggest issue with it, is that `arr.astype(np.floating)` looks like it will let float32 or float128 pass, but it will force a float64 output! Arguably downcasting is a bug in this case. A related issue is `np.dtype("S")` and especially "S0". The dtype "S" does make sense for most or all places where `dtype=...` can be passed. However, it is conceptionally different from other dtypes, since it will not end up being attached to the array (unlike "S2" which would be). The dtype "S" really means the type number/DType class of String, and not a specific dtype instance.
* | Merge pull request #15487 from ericmariasis/quantileSebastian Berg2020-03-042-1/+11
|\ \ | | | | | | BUG: Fixing result of np quantile edge case
| * | BUG: Fixing result of np quantile edge caseEric Mariasis2020-02-282-1/+11
| | |
* | | DOC: Update to clarify actual behavior real_if_(all elements)_close (gh-15644)and-sang2020-02-281-5/+6
|/ / | | | | | | | | | | Updated the description to consider all array elements Updated the examples to use multiple elements array, to show that one element not close enough prevent for the whole array to be considered as real Closes #15626
* | BUG: fix doctest exception messagesmattip2020-02-281-1/+3
| |
* | DOC: fix documentation for apply_along_axis (#15619)Heshy Roskes2020-02-201-2/+2
| |
* | Merge pull request #15465 from mwtoews/importsSebastian Berg2020-02-071-1/+0
|\ \ | |/ |/| MAINT: cleanup unused imports; avoid redefinition of imports
| * MAINT: cleanup unused imports; avoid redefinition of importsMike Taves2020-02-061-1/+0
| | | | | | | | | | | | | | * Cleanup unused imports (F401) of mostly standard Python modules, or some internal but unlikely referenced modules * Where internal imports are potentially used, mark with noqa * Avoid redefinition of imports (F811)
* | Update unique docstring exampleJon Morris2020-02-041-2/+2
|/
* MAINT: Remove sys.version checks (gh-#15373)Seth Troisi2020-01-281-35/+0
| | | More sys.version cleanup.
* BUG: np.load does not handle empty array with an empty descr (#15397)Sha Liu2020-01-272-8/+13
| | | | | | | The bug occurs since numpy 1.16. Before that empty descr corresponds to `np.dtype([])`. This fixes the problem by following numpy 1.15's behavior. Closes gh-15396
* STY: use 'yield from <expr>' for simple cases (#15444)Mike Taves2020-01-274-28/+15
| | | | | | | | | This PR uses simple cases of PEP 380 to rewrite: for v in g: yield v into: yield from <expr>
* Merge pull request #15421 from sethtroisi/contextlib_py2Matti Picus2020-01-271-21/+12
|\ | | | | ENH: Make use of ExitStack in npyio.py
| * ENH: Make use of ExitStack in npyio.pySeth Troisi2020-01-241-21/+12
| |
* | MAINT: Remove Python2 workaroundsSeth Troisi2020-01-231-1/+0
|/
* Merge pull request #15407 from charris/replace-basestringSebastian Berg2020-01-235-22/+18
|\ | | | | MAINT: Replace basestring with str.
| * MAINT: Replace basestring with str.Charles Harris2020-01-235-22/+18
| | | | | | | | | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* | Merge pull request #15398 from mwtoews/urllibCharles Harris2020-01-231-15/+5
|\ \ | |/ |/| MAINT: Revise imports from urllib modules
| * MAINT: Revise imports from urllib modulesMike Taves2020-01-241-15/+5
| |
* | MAINT: Clean up, mostly unused imports.Warren Weckesser2020-01-235-8/+2
|/
* Merge pull request #15377 from sethtroisi/misc_cleanups2Matti Picus2020-01-231-1/+1
|\ | | | | MAINT: Cleanup python2 references
| * MAINT: Cleanup python2 referencesSeth Troisi2020-01-211-1/+1
| |
* | Merge pull request #15379 from sethtroisi/misc_cleanups3Matti Picus2020-01-231-3/+2
|\ \ | | | | | | MAINT: Python2 Cleanups
| * | MAINT: Python2 CleanupsSeth Troisi2020-01-211-3/+2
| |/
* | MAINT: Revise imports from collections.abc moduleMike Taves2020-01-221-7/+2
|/
* NEP: issue deprecation warning when creating ragged array (NEP 34)Matti Picus2020-01-212-15/+20
| | | | This implements NEP 34.
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-206-158/+36
|
* MAINT: Fix mistype in histogramdd docstringKirill Zinovjev2020-01-191-2/+2
|
* MAINT: Remove sys.version checks in testsSeth Troisi2020-01-157-96/+38
|
* Merge pull request #15307 from sethtroisi/sys_version_preMatti Picus2020-01-161-5/+2
|\ | | | | MAINT: cleanup sys.version dependant code
| * MAINT: cleanup sys.version dependant codeSeth Troisi2020-01-121-5/+2
| |
* | DOC: fix typosBrian Wignall2020-01-143-4/+4
|/
* MAINT: Implement keyword-only arguments as syntaxEric Wieser2020-01-063-32/+12
| | | | Now that 2.7 is gone, there is no need to pop manually from kwarg dictionaries.
* MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-0530-175/+175
| | | | | | | 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-0350-99/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUG: lib: Fix handling of integer arrays by gradient.Warren Weckesser2020-01-012-4/+47
| | | | | | | In numpy.gradient, convert integer array inputs to float64 to avoid unwanted modular arithmetic. Closes gh-15207.
* MAINT: lib: Clean up in tests.Warren Weckesser2020-01-013-3/+0
| | | | * Remove a few unused imports in several files.
* MAINT: lib: Clean up in twodim_base.py.Warren Weckesser2020-01-011-2/+2
| | | | * Remove unused imports.
* MAINT: lib: Clean up in function_base.py.Warren Weckesser2020-01-011-16/+13
| | | | | | * Remove conditional imports that handled Python 2. * Remove unused imports. * Partial PEP 8 clean up.
* MAINT: lib: Clean up in _iotools.pyWarren Weckesser2020-01-011-45/+6
| | | | | | | * Remove the unused function _to_filehandle(). * Remove conditional imports that handled Python 2. * Remove unused imports. * Fix a few line lengths (PEP 8).
* DOC: bring the out parameter docstring into line with ufuncs (#15097)Matti Picus2019-12-141-7/+17
|
* Merge pull request #14981 from seberg/issue-13103Matti Picus2019-12-112-20/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c088383cb290ca064d456e89d79177a0e234cb8d and uses the same kind casting rule for the additional keyword arguments ``to_end`` and ``to_begin``. This results in slightly more leniant behaviour for integers (which can now have overflows that are hidden), but fixes an issue with the handling of NaN. Generally, this behaviour seems more conistent with what NumPy does elsewhere. The Overflow issue exists similar in many other places and should be solved by integer overflow warning machinery while the actual cast takes place. Closes gh-13103
| * BUG: Make ``ediff1d`` kwarg casting consistentSebastian Berg2019-11-252-20/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c088383cb290ca064d456e89d79177a0e234cb8d and uses the same kind casting rule for the additional keyword arguments ``to_end`` and ``to_begin``. This results in slightly more leniant behaviour for integers (which can now have overflows that are hidden), but fixes an issue with the handling of NaN. Generally, this behaviour seems more conistent with what NumPy does elsewhere. The Overflow issue exists similar in many other places and should be solved by integer overflow warning machinery while the actual cast takes place. Closes gh-13103
* | Revert "DEP: issue deprecation warning when creating ragged array (NEP 34)"revert-14794-nep-0034-implRalf Gommers2019-12-062-20/+15
| |
* | TST: fix up issues in requires_memory decoratorPauli Virtanen2019-12-041-1/+1
| | | | | | | | Fix wrong multiplier for /proc/meminfo, and do style cleanups.
* | Merge pull request #15023 from qwhelan/nan_perfMatti Picus2019-12-032-2/+30
|\ \ | | | | | | MAINT: Only copy input array in _replace_nan() if there are nans to replace
| * | PERF: only copy input array in _replace_nan() if there are nans to replaceChristopher Whelan2019-12-022-2/+30
| | |
* | | MAINT: Cleaned up mintypecode for Py3Joseph R. Fox-Rabinovitz2019-12-021-1/+1
| | | | | | | | | | | | | | | | | | Using generators instead of full-blown lists Using set for search instead of list Using min to get single element insteaf of sorting full list
* | | Merge pull request #14794 from mattip/nep-0034-implRalf Gommers2019-12-022-15/+20
|\ \ \ | | | | | | | | DEP: issue deprecation warning when creating ragged array (NEP 34)
| * | | TST: fix failing testmattip2019-10-311-1/+1
| | | |