summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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)
* Merge pull request #7823 from madphysicist/ma-bugsJulian Taylor2016-08-271-3/+3
|\ | | | | BUG: Fixed masked array behavior for scalar inputs to np.ma.atleast_*d
| * BUG: Fixed masked array behavior for scalar inputs to np.ma.atleast_*dJoseph Fox-Rabinovitz2016-08-241-3/+3
| |
* | DOC: Fixed documented dimension of return value Joseph Fox-Rabinovitz2016-08-261-1/+1
|/ | | The first dimension of the return value depends on the degree of the polynomial, not the number of elements being used in the fit.
* Merge pull request #7936 from goerz/sparse-type-checkStephan Hoyer2016-08-172-2/+45
|\ | | | | ENH: improve duck typing inside iscomplexobj
| * ENH: improve duck typing inside iscomplexobjMichael Goerz2016-08-152-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both `iscomplexobj` and `isrealobj` now try to refer to the argument's `dtype` attribute if it exists. This significantly extends the list of types for which `iscomplexobj` returns correct results (including e.g. scipy sparse matrices and pandas objects). Extended the tests of the `iscomplexobj` routine for the following cases: * simple scalars * standard lists (test internal auto-conversion to numpy arrays) * "Duck typing" for objects that define a dtype attribute (either referring to one of the existing numpy dtypes, or a custom dtype, as pandas does) This fixes #7924
* | ENH: skip or avoid gc/objectmodel differences btwn pypy and cpythonmattip2016-08-152-2/+5
|/
* Spelling and grammar fix.Daniel Ching2016-08-041-2/+2
| | | Histogram documentation was missing an 'a' in the phrase 'all around performance'.
* DOC: fix typo in documentation of loadtxt (closes #7878)dunneff2016-07-281-1/+1
|
* 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-224-105/+170
|\ | | | | ENH Generalized rot90
| * MAINT: fix indentation and whitespaces of the flip functionEren Sezener2016-03-201-12/+7
| |
| * ENH: generalize rot90 with axes kwarg, move to function_base.py, and add testsDenis Alevi2016-03-204-93/+163
| |
* | TST: Test that polyfit raises if not enough data for cov estimate.Charles Harris2016-06-152-4/+10
| | | | | | | | Also a slight refactoring of np.polyfit.
* | BUG: Make sure we don't divide by zero in np.polyfit.David Schaich2016-06-151-0/+3
| | | | | | | | | | | | | | | | This should fix the issue discussed at https://mail.scipy.org/pipermail/numpy-discussion/2013-July/067076.html Without the ValueError added here, polyfit can (and does) return negative or nan variances with no warning.
* | Merge pull request #4073 from endolith/patch-2Charles Harris2016-06-152-7/+27
|\ \ | | | | | | BUG: change real output checking to test if all imaginary parts are zero
| * | TST: Set seed for deterministic random testEndolith2015-03-081-103/+6
| | | | | | | | | | | | also fixed some PEP8 issues
| * | Simpler checking of complex conjugatesendolith2015-02-171-6/+3
| | |
| * | TST: Fix missing imports, undeterministic testendolith2015-01-251-2/+101
| | | | | | | | | | | | Change to a deterministic test instead of using rand
| * | TST: Add tests for np.poly()endolith2015-01-251-0/+22
| | |
| * | BUG: sort after conjugating so that poly() outputs real type for exact ↵endolith2015-01-251-6/+5
| | | | | | | | | | | | conjugates
* | | MAINT: FutureWarning for changes to np.average subclass handlingAllan Haldane2016-06-141-1/+13
| | | | | | | | | | | | Fixes #7403
* | | DOC: fix typo in savetxt docstring (closes #7620)bertrand2016-06-101-1/+1
| | |
* | | STY: Misc whitespace cleanup.Erik M. Bray2016-05-311-4/+4
| | |
* | | BUG: Fixes to reading and writing of empty arrays, and in particular arrays ↵Erik M. Bray2016-05-312-12/+23
| | | | | | | | | | | | with empty dtypes. See #6430
* | | BUG: fix handling of right edge of final bin.Robert Kern2016-05-252-3/+8
| | |
* | | ENH: correct initial index estimate in histogram.Robert Kern2016-05-241-5/+16
| | |
* | | TST: Failing test for histogram.Robert Kern2016-05-241-0/+11
| | |
* | | TST: mark two tests in numpy.lib as slow, speeds up numpy.lib tests by 5xRalf Gommers2016-05-162-2/+3
| | |
* | | TST: fix test error due to use of deprecated np.testing.rand utility.Ralf Gommers2016-05-161-4/+4
| | |
* | | TST: fix test error when saving large array with savez.Ralf Gommers2016-05-161-2/+9
| | |