summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
Commit message (Collapse)AuthorAgeFilesLines
...
* change int check to bool check for rowvar in covBrandon Carter2016-12-191-2/+2
|
* change rowvar param to boolean from int in corrcoefBrandon Carter2016-12-191-3/+3
|
* BUG: handle unmasked NaN in ma.median like normal medianJulian Taylor2016-12-121-17/+1
| | | | | | | | | | | 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: let average preserve subclass information.Marten van Kerkwijk2016-11-191-13/+1
| | | | | | This behaviour matches that for most other numpy functions (such as np.mean). It was initially slated for 1.12, but replaced by a FutureWarning. Hence, this is for 1.13.
* Merge pull request #8194 from alvarosg/scalar-piecewiseseberg2016-11-091-5/+12
|\ | | | | BUG: np.piecewise not working for scalars
| * BUG: np.piecewise not working for scalarsalvarosg2016-10-261-5/+12
| |
* | Merge pull request #5302 from idfah/masterRalf Gommers2016-11-061-11/+7
|\ \ | |/ |/| Fixed meshgrid to return arrays with same dtype as arguments.
| * Fix to meshgrid allows passing array sub-classesElliott Forney2016-10-101-1/+1
| |
| * Fixed meshgrid to return arrays with same dtype as arguments.Elliott M Forney2014-11-201-11/+7
| |
* | ENH: add signature argument to vectorize for vectorizing like generalized ↵Stephan Hoyer2016-10-171-35/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ufuncs (#8054) * ENH: add signature argument to vectorize for generalized ufuncs Example usage (from the docstring): Vectorized convolution: >>> convolve = np.vectorize(np.convolve, signature='(n),(m)->(k)') >>> convolve(np.eye(4), [1, 2, 1]) array([[ 1., 2., 1., 0., 0., 0.], [ 0., 1., 2., 1., 0., 0.], [ 0., 0., 1., 2., 1., 0.], [ 0., 0., 0., 1., 2., 1.]]) * Use str.format rather than % * Fix spelling typo * BUG: fix np.vectorize for size 0 inputs * DOC: add vectorize to 1.12.0 release notes * [ci-skip] Remove outdated comment
* | DOC: change version references from x.y to x.y.zPierre de Buyl2016-09-071-3/+3
| |
* | 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-15/+15
| |
* | Spelling and grammar fix.Daniel Ching2016-08-041-2/+2
| | | | | | Histogram documentation was missing an 'a' in the phrase 'all around performance'.
* | DOC: Misplaced parens in formulaJoseph Fox-Rabinovitz2016-07-061-1/+1
| |
* | "lambda" is not allowed to use as keyword arguments because it is a reserved ↵Toshihiro Kamishima2016-07-041-2/+2
| | | | | | | | word.
* | Merge pull request #7347 from erensezener/generalized_rot90Charles Harris2016-06-221-3/+89
|\ \ | | | | | | ENH Generalized rot90
| * | ENH: generalize rot90 with axes kwarg, move to function_base.py, and add testsDenis Alevi2016-03-201-3/+89
| | |
* | | MAINT: FutureWarning for changes to np.average subclass handlingAllan Haldane2016-06-141-1/+13
| | | | | | | | | | | | Fixes #7403
* | | BUG: fix handling of right edge of final bin.Robert Kern2016-05-251-3/+3
| | |
* | | ENH: correct initial index estimate in histogram.Robert Kern2016-05-241-5/+16
| | |
* | | ENH: linear interpolation of complex values in lib.interpPeter Creasey2016-05-121-14/+34
| | | | | | | | | | | | | | | | | | | | | lib.interp function now allows interpolation of complex fp with complex128 precision (i.e. equivalent to lib.interp on the real and imaginary parts). Tests are added for the non-periodic and periodic cases.
* | | DOC: Fix some incorrect RST definition listsEndolith2016-05-111-1/+1
| | |
* | | BUG: distance arg of np.gradient must be scalar, fix docstringAllan Haldane2016-05-111-5/+7
| | | | | | | | | | | | | | | | | | | | | Fixups to docstring, and disallow non-scalars as the distance args to np.gradient. Fixes #7548, fixes #6847
* | | Merge pull request #7505 from ahaldane/fixup_7382Charles Harris2016-04-041-1/+2
|\ \ \ | | | | | | | | MAIN: fix to #7382, make scl in np.average writeable
| * | | MAIN: fix to #7382, make scl in np.average writeableAllan Haldane2016-04-041-1/+2
| | | |
* | | | DOC: link frompyfunc and vectorizeendolith2016-04-041-0/+4
|/ / /
* | | BUG: Ongoing fixes to PR#7416Joseph Fox-Rabinovitz2016-03-161-1/+1
| | | | | | | | | | | | | | | Removed superfluous `ceil` call in automated bin width estimator. Updated tests to reflect modified estimator.
* | | DOC: Updated documentation to reflect changes to bin estimators.Joseph Fox-Rabinovitz2016-03-161-26/+40
| | | | | | | | | | | | | | | Described ad nauseum the relationship between `range` parameter and bin estimation. Updated formulas for estimators now that they are returning bin widths.
* | | BUG: Incorrect handling of range in `histogram` with automatic bins.Joseph Fox-Rabinovitz2016-03-161-65/+70
| | | | | | | | | | | | | | | Fixes #7411. Tests and documentation updated. Fixes other small issues with range and bin count computations.
* | | BUG: Fix string copying for np.placegfyoung2016-03-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes bug in string copying in np.place in which replacements strings that were smaller than their replaced elements would only partially replace the element instead of the entire element. Closes gh-6974. Addendum: this commit also appears to have fixed issue with overflow for very large input arrays. Closes gh-7207.
* | | Merge pull request #7414 from charris/tweak-corrcoefCharles Harris2016-03-141-5/+25
|\ \ \ | | | | | | | | Tweak corrcoef
| * | | MAINT/BUG: Clip real and imag parts of corrcoef return to [-1, 1].Charles Harris2016-03-131-5/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The non-nan elements of the result of corrcoef should satisfy the inequality abs(x) <= 1 and the non-nan elements of the diagonal should be exactly one. We can't guarantee those results due to roundoff, but clipping the real and imaginary parts to the interval [-1, 1] improves things to a small degree. Closes #7392.
| * | | ENH: Check array dimensionality in cov function.Charles Harris2016-03-131-0/+6
| | | | | | | | | | | | | | | | | | | | The input arrays are documented to have ndim <=2, so check for that and raise a ValueError on failure.
* | | | Merge pull request #7346 from erensezener/generalized_flipCharles Harris2016-03-121-1/+73
|\ \ \ \ | |/ / / |/| / / | |/ / Generalized flip
| * | ENH: Add generalized flip function and its testsEren Sezener2016-03-121-1/+73
| | |
* | | MAINT: cleanup np.averageAllan Haldane2016-03-071-8/+13
| | |
* | | Maint: Removed extra space from `ureduce` Mad Physicist2016-02-261-1/+1
|/ / | | | | This is just me being OCD. I am not sure this even merits a full commit, much less a PR, but here goes anyway.
* | Merge pull request #7199 from madphysicist/histogram-estimator-dictNathaniel J. Smith2016-02-231-126/+183
|\ \ | | | | | | MAINT: Cleanup for histogram bin estimator selection
| * | MAINT: Cleanup for histogram bin estimator selectionJoseph Fox-Rabinovitz2016-02-161-126/+183
| | | | | | | | | | | | | | | | | | Private function with superfluous checks was removed. Estimator Estimator functions are now semi-public and selection is simplified within histogram itself.
* | | TST: Fixed shuffle axis in tests.Joseph Fox-Rabinovitz2016-02-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Since shuffle only works along the first dimension, it must be done before reshape to get reasonable looking data. Did not affect the current tests. I noticed while working on some scipy code. Also, made a couple of doc changes to np.random.shuffle.
* | | BUG: Preserve array order in np.deletegfyoung2016-02-191-4/+4
|/ / | | | | | | Closes gh-7113.
* | ENH: Adding support to the range keyword for estimation of the optimal ↵Varun Nayyar2016-02-131-3/+23
| | | | | | | | number of bins and associated tests
* | DOC: fix up invalid LaTeX in histogram docstring.Ralf Gommers2016-02-131-20/+24
| |
* | Added 'doane' and 'sqrt' estimators to np.histogram in numpy.function_baseJoseph Fox-Rabinovitz2016-02-111-83/+163
| |
* | MAINT: Made `iterable` return a booleanJoseph Fox-Rabinovitz2016-02-101-8/+8
| |
* | Merge pull request #7181 from madphysicist/doc-typosCharles Harris2016-02-071-57/+64
|\ \ | | | | | | DOC: Updated minor typos in function_base.py and test_function_base.py
| * | DOC: Updated minor typos in function_base.py and test_function_base.pyJoseph Fox-Rabinovitz2016-02-051-57/+64
| | |
* | | MAINT: Removed supurious assert in histogram estimatorsJoseph Fox-Rabinovitz2016-02-051-3/+0
|/ /
* | Merge pull request #7129 from madphysicist/percentile-midpoint-interpolationCharles Harris2016-01-311-1/+1
|\ \ | | | | | | BUG: Fixed 'midpoint' interpolation of np.percentile in odd cases.