summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
| | | |
| * | | DEP: issue deprecation warning when creating ragged array (NEP 34)mattip2019-10-311-14/+19
| | | |
* | | | ENH,DEP: Allow multiple axes in expand_dims (#14051)Larry Bradley2019-12-022-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR allows the axis keyword in expand_dims to be a tuple of ints. Previously, axis could only be an int. This issue was previously discussed in gh-12290 and the changes are based on gh-12290 (comment). This PR also removes the deprecation added in v1.13 (2017-05-17), where previously axis could be outside of the range (-a.ndim - 1) <= axis <= a.ndim. Such an axis value will now raise an AxisError. Please let me know if it's too soon to remove this deprecation (I could not find any dev docs stating the length of the numpy deprecation cycle). Closes gh-12290.
* | | | BUG: warn when saving dtype with metadata (#14994)Matti Picus2019-12-022-0/+44
| | | | | | | | | | | | Address gh-14142 for the 1.18 release: warn when saving a dtype with metadata that cannot be loaded.
* | | | TST: add pytest machinery to specify memory requirements for testsPauli Virtanen2019-12-011-5/+2
| |/ / |/| |
* | | DOC: lib: Use a clearer example of ddof in the notes of the cov docstring.Warren Weckesser2019-11-301-1/+1
| | | | | | | | | | | | | | | | | | Use `ddof = 1` instead of 9, and remove a confusing comment. Closes gh-15010.
* | | DOC: Fix typo in loadtxt and genfromtxtAnis Ladram2019-11-291-2/+2
| | |
* | | DOC: Fix typo in numpy.loadtxt documentationAnis Ladram2019-11-291-1/+1
| | | | | | | | | Parameter fname: generator must return byte strings for Python 3, not Python3k.
* | | MAINT: Cleaned up mintypecode for Py3 (#14967)Joseph Fox-Rabinovitz2019-11-231-6/+4
| |/ |/| | | | | | | 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
* | MAINT: Remove uses of scalar aliasesEric Wieser2019-11-133-17/+17
| | | | | | | | Relates to gh-6103
* | MAINT: revert gh-14800, which gave precedence to OO->O over OO->?mattip2019-11-061-6/+2
| |
* | Merge pull request #14800 from mattip/reorder-obj-comparison-loopCharles Harris2019-11-042-3/+7
|\ \ | | | | | | ENH: change object-array comparisons to prefer OO->O unfuncs
| * | ENH: add OO->? loops, use np.compare(a, b, dtype=bool), add commentsmattip2019-10-302-1/+5
| | |
| * | WIP, DEP, ENH: finish richcompare changes from 1.10mattip2019-10-292-3/+3
| |/
* | TST: Don't construct Fraction instances from numpy scalarsEric Wieser2019-10-301-2/+2
|/ | | | | | Fraction.__float__ gives a DeprecationWarning if the division results in a non-builtin float This was never intended as part of the test anyway.
* DOC: lib: Fix deprecation markup in financial function docstrings.Warren Weckesser2019-10-191-74/+77
| | | | | | | The original version doesn't render correctly; see, for example, https://numpy.org/devdocs/reference/generated/numpy.mirr.html#numpy.mirr The HTML output for the updated markup looks much better.
* Merge pull request #14629 from sethtroisi/polyfit_docRalf Gommers2019-10-181-4/+4
|\ | | | | DOC: clarify residual in np.polyfit
| * DOC: clarify residual in np.polyfitSeth Troisi2019-10-021-4/+4
| |
* | Merge pull request #14699 from mattip/doc-warningsRalf Gommers2019-10-182-16/+16
|\ \ | | | | | | MAINT: reduce the number of doc build warnings
| * | DOC: convert `None` to bare None or ``None``mattip2019-10-151-1/+1
| | |
| * | DOC: fix output argument referencemattip2019-10-151-15/+15
| |/
* | MAINT: deprecate financial functions.Warren Weckesser2019-10-162-0/+151
| | | | | | | | As per NEP-32, the financial functions are deprecated.
* | BUG: lib: Fix histogram problem with signed integer arrays.Warren Weckesser2019-10-152-5/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An input such as np.histogram(np.array([-2, 0, 127], dtype=np.int8), bins="auto") would raise the exception ValueError: Number of samples, -1, must be non-negative. The problem was that the peak-to-peak value for the input array was computed with the `ptp` method, which returned negative values for signed integer arrays when the actual value was more than the maximum signed value of the array's data type. The fix is to use a peak-to-peak function that returns an unsigned value for signed integer arrays. Closes gh-14379.
* | Merge pull request #9301 from GuyInALabCoat/doc_editMatti Picus2019-10-151-14/+16
|\ \ | | | | | | DOC: added note to docstring of numpy.savez
| * | Use filename (vs file name) consistentlyStefan van der Walt2019-10-151-8/+8
| | |
| * | Tidy up savez keys-as-file-names languageStefan van der Walt2019-10-151-20/+8
| | |
| * | DOC: edited numpy.savez docstring note to be more specificDmytro2019-10-151-4/+13
| | | | | | | | | | | | | | | | | | | | | Note states that dictionary keys are stored as file names and may undergo unintended changes when they are not recognized as valid file names. In such cases the keys must be properly encapsulated and escaped to avoid being changed.
| * | DOC: added note to docstring of numpy.savezDmytro2019-10-151-0/+5
| |/ | | | | | | | | | | Note indicates that when used with dictionaries, savez will remove leading "/" in dictionary keys. See #9265