summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
Commit message (Collapse)AuthorAgeFilesLines
* ENH: add dtype option to cov and corrcoef (#17456)Lisa Schwetlick2020-10-091-9/+24
| | | | | | | Adds a keyword-only dtype parameter to correlate and coerrcoef to allow user to specify the dtype of the output. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* DOC: Fix syntax errors in docstrings for versionchanged, versionadded (#17338)Bradley Dice2020-09-171-1/+1
| | | * DOC: Fix typos in versionchanged.
* DOC: reformat meshgrid see also linksRoss Barnowski2020-09-091-4/+3
|
* Fix docstring cross-referencingAlbert Villanova del Moral2020-09-041-2/+2
|
* ENH: Make the window functions exactly symmetricEric Wieser2020-08-311-8/+8
| | | | | | This relies on the fact that `cos` is exactly symmetric around zero, but not around the floating-point approximation of `pi`. Closes gh-17169.
* BUG: revert trim_zeros changes from gh-16911mattip2020-08-271-56/+0
|
* DOC: Fix spacing in vectorize docKevin Sheppard2020-08-201-2/+2
| | | | Fix spacing that produced incorrect rendering
* Merge pull request #17058 from BvB93/trim_zeros2Matti Picus2020-08-191-8/+14
|\ | | | | MAINT: Revert boolean casting back to elementwise comparisons in `trim_zeros`
| * MAINT: Issue the DeprecationWarning after creating the to-be returned arrayBas van Beek2020-08-131-4/+5
| |
| * MAINT: Catching warnings is expensive; remove itBas van Beek2020-08-111-5/+6
| |
| * ENH: Use elementwise comparisons with 0 rather than boolean castingBas van Beek2020-08-111-2/+6
| |
* | API, BUG: Raise error on complex input to i0 (#17062)peterbell102020-08-121-13/+10
|/ | | | * BUG, API: Raise error on complex input to np.i0
* ENH: Speed up trim_zeros (#16911)Bas van Beek2020-08-041-8/+59
| | | | | | | | | | | | | * Added a benchmark for `trim_zeros()` * Improve the performance of `np.trim_zeros()` * Increase the variety of the tests Fall back to the old `np.trim_zeros()` implementation if an exception is encountered. Emit a `DeprecationWarning` in such case. * DEP,REL: Added a deprecation release note
* Revert "Merge pull request #16248 from alexrockhill/edge"mattip2020-07-231-23/+3
|
* change != to ==Alex2020-07-221-1/+1
|
* fixed simplifyAlex2020-07-221-5/+10
|
* simplifiedAlex2020-07-221-14/+11
|
* forgot to include monotonicityAlex2020-07-221-2/+2
|
* changed from large number error to different solutionAlex2020-07-221-8/+10
|
* edge first tryAlex2020-07-221-2/+18
| | | | | | ENH: added edge keyword argument to digitize added test
* DOC: Add explanation of 'K' and 'A' layout options to 'asarray*' functions ↵Neal C2020-07-141-4/+7
| | | | | | | (#16811) * DOC: update parameter choices for asarray, asarray_contiguous, asarray_chkfinite converters Co-authored-by: sun <sun@vosdbt.org>
* DOC: add example to corrcoef function (#16805)Laurie Stephey2020-07-111-0/+63
|
* Merge pull request #16273 from CloseChoice/BUG-order_percentile-monotonicallySebastian Berg2020-06-271-1/+7
|\ | | | | BUG: Order percentile monotonically
| * Update numpy/lib/function_base.pyTobias Pitters2020-06-121-11/+6
| | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| * fix _scalar_or_0d in _lerpTobias Pitters2020-06-101-1/+1
| |
| * make lerp be able to handle 0d casesTobias Pitters2020-06-101-2/+2
| |
| * remove debug statementsTobias Pitters2020-05-271-1/+0
| |
| * fix lerp function and corresponding testsTobias Pitters2020-05-271-3/+11
| |
| * use symmetric lerp functionTobias Pitters2020-05-271-8/+4
| |
| * fix symmetry testTobias Pitters2020-05-271-6/+6
| |
| * remove pdb; add hypothesis tests for monotony, boundedness and symmetry of lerpTobias Pitters2020-05-271-2/+8
| |
| * add hypothesis test, fix bug of non-monotonic ordering of quantile functionCloseChoice2020-05-271-1/+3
| |
* | DOC: Fixes for 18 broken links (#16472)bjnath2020-06-061-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DOC: Fixes for 18 broken links This, with PR #16465, should fix nearly all the remaining broken links on the site. 4 or 5 others should be easy to fix and just need attention from someone more knowledgeable -- will open an issue. For release notes with dead links, I could usually find links on archive.org for roughly contemporary versions. * DOC: Update to "Fixes for 18 broken links #16472" * Obsolete links, previously commented out, now deleted: https://github.com/numpy/numpy/pull/16472#discussion_r433928958 * Semantic markup for reference to Python class: https://github.com/numpy/numpy/pull/16472#discussion_r433553928 * Missing :ref: in internal link: https://github.com/numpy/numpy/pull/16472#discussion_r433554484 Not included: Resolution on using external/internal doc link in .py: https://github.com/numpy/numpy/pull/16472#discussion_r433554824 * DOC: Add internal link for 'Fixes for 18 broken links' PR #16472 Making reference [1] an internal link in function_base.py => numpy.vectorize.html * DOC: Redirect 2 link fixes in PR #16472 * governance.rst link reverted * ununcs.rst `overridden` link goes where it was meant to per https://github.com/numpy/numpy/pull/16472#pullrequestreview-424666070
* | MAINT: use zip instead of range in piecewiseEric Wieser2020-06-011-8/+6
| | | | | | | | Minor cleanup while looking at something else.
* | DOC: make clearer that sinc is normalized by a factor piRalf Gommers2020-05-301-4/+11
|/ | | | Addresses gh-13457
* Merge pull request #16332 from ↵Matti Picus2020-05-221-0/+4
|\ | | | | | | | | LSchroefl/link_SciPy_multidimensional_interpolation DOC: link np.interp to SciPy's interpolation functions (closes #14154)
| * Update numpy/lib/function_base.pyLSchroefl2020-05-221-1/+1
| | | | | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
| * DOC: link np.interp to SciPy's multidimensional interpolation functions (#14154)skywalker2020-05-211-0/+4
| |
* | Merge pull request #16284 from eric-wieser/extract-lerpSebastian Berg2020-05-191-62/+58
|\ \ | | | | | | MAINT: Clean up the implementation of quantile
| * | MAINT: remove workaround for fixed issue Eric Wieser2020-05-191-2/+0
| | | | | | | | | take now correctly returns `out`, even on 0d arrays
| * | MAINT: Remove special cases for 0d arrays in quantileEric Wieser2020-05-181-62/+55
| | | | | | | | | | | | This also simplifies the axis handling logic, taking advantage of the fact we know `axis` is 0 for the rest of the function body
| * | MAINT: Extract a lerp helper function to make the algorithm of quantile clearerEric Wieser2020-05-181-4/+9
| |/ | | | | | | This does not affect the behavior in any way
* | Merge pull request #16156 from WarrenWeckesser/deprecate-dualSebastian Berg2020-05-191-1/+0
|\ \ | |/ |/| DEP: Deprecate `numpy.dual`.
| * DEP: Deprecate `numpy.dual`.Warren Weckesser2020-05-041-1/+0
| | | | | | | | | | | | Add a deprecation warning in the `numpy.dual` module, and remove the use of `numpy.dual` from the few places where it is used in the numpy code.
* | MAINT: Avoid moving axes around multiple timesEric Wieser2020-05-171-15/+5
| | | | | | | | It's easier to move the relevant axis to position 0 in `ap` first than it is to move it for every relevant object simultaneously.
* | MAINT: Remove a pointless ifEric Wieser2020-05-171-4/+1
| | | | | | | | The `add` ufunc is happy to handle `out=None` by itself
* | Merge pull request #16125 from WarrenWeckesser/vectorize-bugMatti Picus2020-05-061-7/+15
|\ \ | | | | | | BUG: lib: Fix a problem with vectorize with default parameters.
| * | BUG: lib: Fix a problem with vectorize with default parameters.Warren Weckesser2020-04-301-7/+15
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `otypes` is given to `vectorize` and then the instance is called, it creates a ufunc by calling numpy.core.umath.frompyfunc. The number of arguments given to this ufunc is set to the number of arguments in the call of the vectorize instance. This ufunc is cached, so frompyfunc does not have to be called on the next call. The problem is that, if the function being wrapped has parameters with default values, the number of arguments passed to the vectorize instance can change, and when that happens, a new ufunc must be created by calling frompyfunc with the correct number of arguments. This commit changes the cache of the ufunc from a simple attribute that holds the most recent ufunc to a dictionary whose keys are the number of arguments in the call. The cache is only used when the vectorized function is called with only positional arguments and there are no excluded arguments. If keywords are used, the number of arguments is no longer sufficient to uniquely identify a previously created ufunc. Closes gh-16120.
* | DOC: Update np.copy docstring to include ragged case (#15928)Guilherme Leobas2020-05-051-0/+24
|/ | | | | | | | | We only do a shallow copy of arrays (mainly important for object arrays), so mention that in the documentation. Fixes #15923 Co-Authored-By: Eric Wieser <wieser.eric@gmail.com> Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>
* Added note to angle function docstring about angle(0) being 0.Melissa Weber Mendonca2020-04-131-0/+5
|