summaryrefslogtreecommitdiff
path: root/numpy/lib
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
|
* Merge pull request #8382 from charris/fix-python-3.6-compatCharles Harris2016-12-171-1/+1
|\ | | | | DEP: Fix escaped string characters deprecated in Python 3.6.
| * DEP: Fix escaped string characters deprecated in Python 3.6.Charles Harris2016-12-141-1/+1
| | | | | | | | | | | | | | In Python 3.6 a number of escape sequences that were previously accepted -- for instance "\(" that was translated to "\\(" -- are deprecated. To retain the previous behavior either raw strings must be used or the backslash must be properly escaped itself.
* | ENH: retune apply_along_axis nanmedian cutoffJulian Taylor2016-12-171-1/+2
|/ | | | | Old value was erroneously obtained on a sorted array which is a best case for the median of 3 pivoted introsort.
* Merge pull request #8364 from juliantaylor/masked-median-nanCharles Harris2016-12-124-30/+78
|\ | | | | BUG: handle unmasked NaN in ma.median like normal median
| * ENH: update the small nanmedian thresholdJulian Taylor2016-12-121-1/+1
| | | | | | | | | | | | | | | | The apply_along_axis path is significantly more expensive than currently accounted for in the check. Increase the minimum axis size from 400 to 1000 elements. Either apply_along_axis got more expensive over time or the original benchmarking was flawed.
| * BUG: handle unmasked NaN in ma.median like normal medianJulian Taylor2016-12-123-29/+77
| | | | | | | | | | | | | | | | | | | | | | 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.
* | BUG: fix nanpercentile not returning scalar with axis argumentJulian Taylor2016-12-112-2/+6
|/ | | | Closes gh-8220
* MAINT: Other cleanup Python < 2.7 and Python3 < 3.4Alexandr Shadchin2016-12-093-25/+6
|
* BUG: Apply more robust string converts in loadtxtgfyoung2016-12-082-2/+11
| | | | | | | | | | The original dtype converters for bytes and str did not account for converting objects of str or bytes dtype respectively. Replace the original converters with those from numpy.compat, which are much more robust. Closes gh-8033.
* BUG: fix packbits and unpackbits to correctly handle empty arraysTakuya Akiba2016-12-021-2/+63
|
* MAINT: let average preserve subclass information.Marten van Kerkwijk2016-11-192-18/+3
| | | | | | 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.
* Added axis argument to numpy.uniquemartinosorb2016-11-132-116/+259
|
* Merge pull request #8194 from alvarosg/scalar-piecewiseseberg2016-11-092-6/+23
|\ | | | | BUG: np.piecewise not working for scalars
| * BUG: np.piecewise not working for scalarsalvarosg2016-10-262-6/+23
| |
* | Merge pull request #5302 from idfah/masterRalf Gommers2016-11-062-11/+32
|\ \ | | | | | | 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-202-11/+32
| | |
* | | Merge pull request #7987 from f0k/advertise-open_memmapCharles Harris2016-10-281-0/+1
|\ \ \ | | | | | | | | DOC: See also np.load and np.memmap in np.lib.format.open_memmap
| * | | DOC: Hint at lib.format.open_memmap from np.load and np.memmapJan Schlüter2016-08-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | np.load supports memmap_mode to open existing .npy files as memory-mapped files. np.memmap supports creating or loading raw binary files as memory-mapped files. This adds a link to a function for creating memory-mapped files in .npy format.
* | | | Merge pull request #8218 from mattharrigan/ediff1d-performanceCharles Harris2016-10-282-12/+17
|\ \ \ \ | |_|_|/ |/| | | BUG: ediff1d should return subclasses
| * | | BUG: return subclasses from ediff1dMattHarrigan2016-10-272-13/+14
| | | |
| * | | ENH: fast track default kwargs for ediff1dMattHarrigan2016-10-261-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | Special case to_begin and to_end both equal to None, avoiding subsequent steps. Particulary faster for small arrays where overhead plays a big role.
* | | | Merge pull request #8183 from mattharrigan/ediff1d-performanceStephan Hoyer2016-10-242-14/+33
|\ \ \ \ | |/ / / | | | | Ediff1d performance
| * | | TST: Added cases for better coverage of ediff1dMattHarrigan2016-10-211-0/+6
| | | |
| * | | ENH: performance improvement to ediff1dMattHarrigan2016-10-181-14/+27
| | | | | | | | | | | | | | | | | | | | Eliminate a copy operation when to_begin or to_end is given. Also use ravel instead of flatiter which is much faster.
* | | | Merge pull request #8109 from skwbc/issue#7546Charles Harris2016-10-221-0/+21
|\ \ \ \ | | | | | | | | | | Fix bug in ravel_multi_index for big indices (Issue #7546)
| * | | | TST: add intp type check in test_big_indicesShota Kawabuchi2016-10-031-4/+6
| | | | |
| * | | | BUG: add array size overflow check in arr_ravel_multi_indexShota Kawabuchi2016-10-031-1/+14
| | | | |
| * | | | BUG: fix ravel_multi_index for big indices (issue #7546)Shota Kawabuchi2016-09-261-0/+6
| | | | |
* | | | | DOC: Minor spelling fix in genfromtxt() docstring.wrwrwr2016-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | Closes #8166.
* | | | | ENH: add signature argument to vectorize for vectorizing like generalized ↵Stephan Hoyer2016-10-172-35/+407
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge pull request #8121 from wrwrwr/imp-hist2d-exampleRalf Gommers2016-10-121-29/+17
|\ \ \ \ | | | | | | | | | | DOC: Improve histogram2d() example.
| * | | | DOC: Improve histogram2d() example.wrwrwr2016-10-081-29/+17
| | | | | | | | | | | | | | | | | | | | Closes #8115.
* | | | | ENH: allow numpy.apply_along_axis() to work with ndarray subclasses (#7918)Ben Rowland2016-10-112-3/+38
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies the numpy.apply_along_axis() function so that if it is called with an ndarray subclass, the internal func1d calls receive subclass instances and the overall function returns an instance of the subclass. There are two new tests for these two behaviours.
* | | | MAINT: fix assert_raises_regex when used as a context managerStephan Hoyer2016-09-261-1/+6
|/ / / | | | | | | | | | | | | Formerly, I got DeprecationWarnings about callable being None when I tested on Python 3.
* | | Merge pull request #8087 from hodgka/masterCharles Harris2016-09-231-3/+4
|\ \ \ | | | | | | | | BUG: financial.pmt modifies input #8055
| * | | BUG: financial.pmt modifies input #8055naveenarun2016-09-231-3/+4
| | | | | | | | | | | | | | | | | | | | financial.pmt masked rate array in place, changing rate array. Changed to mask to a new array, preserving the original rate array.
* | | | DOC: Fix erroneous return type description for np.roots.Stuart Archibald2016-09-231-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | np.roots() does not always return complex roots, the roots of a polynomial depend its coefficients and therefore may be in the real or complex domain. e.g. ``` >>> (np.roots([1,2,3])).dtype dtype('complex128') >>> (np.roots([1,2,])).dtype dtype('float64') ```
* | | DOC: Fix description of isinf in nan_to_numYash Shah2016-09-201-1/+1
| | | | | | | | | Minor fix: Change isinf description in "See Also" section of nan_to_num documentation to POSITIVE or negative infinity. Must have been a typo.
* | | BUG : financial.pmt modifies input (issue #8055)KhaledTo2016-09-181-1/+1
| | |
* | | BUG: lib: Simplify (and fix) pad's handling of the pad_widthWarren Weckesser2016-09-172-29/+24
| | | | | | | | | | | | | | | | | | | | | | | | Simplify the expansion of the pad_width argument by using `broadcast_to()`. This fixes the problem reported in gh-7808, where, for example, `pad_width=((1, 2),)` resulted in an error. Closes gh-7808.
* | | DOC: change version references from x.y to x.y.zPierre de Buyl2016-09-072-4/+4
| | |
* | | DOC: change Numpy to NumPy in dosctrings and commentsPierre de Buyl2016-09-067-20/+20
| | | | | | | | | | | | The strings in error messages were left untouched
* | | ENH: Add stacklevel to all (or almost all) our function callsSebastian Berg2016-09-026-33/+33
| | |
* | | TST: Use ComplexWarning suppression only where neededSebastian Berg2016-09-021-2/+6
| | |
* | | TST: Replace catch_warnings when recording is not enforced in test_nanfuncsSebastian Berg2016-09-021-10/+10
| | |
* | | TST: Use new warnings context manager in all testsSebastian Berg2016-09-022-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | In some places, just remove aparently unnecessary filters. After this, all cases of ignore filters should be removed from the tests, making testing (even multiple runs) normally fully predictable.
* | | ENH: Remove warning ignoring from nanfuncsSebastian Berg2016-09-023-70/+66
|/ / | | | | | | | | | | Comment mentions a speedup, but it seems unsure why it should be there. Instead use an error state in divide_by_count. Some extra complex warnings had to be ignored (but those seemed correct)