summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
* Added axis argument to numpy.uniquemartinosorb2016-11-131-105/+186
|
* Merge pull request #8194 from alvarosg/scalar-piecewiseseberg2016-11-091-1/+11
|\ | | | | BUG: np.piecewise not working for scalars
| * BUG: np.piecewise not working for scalarsalvarosg2016-10-261-1/+11
| |
* | Merge pull request #5302 from idfah/masterRalf Gommers2016-11-061-0/+25
|\ \ | | | | | | Fixed meshgrid to return arrays with same dtype as arguments.
| * | Fixed meshgrid to return arrays with same dtype as arguments.Elliott M Forney2014-11-201-0/+25
| | |
* | | Merge pull request #8218 from mattharrigan/ediff1d-performanceCharles Harris2016-10-281-0/+2
|\ \ \ | |_|/ |/| | BUG: ediff1d should return subclasses
| * | BUG: return subclasses from ediff1dMattHarrigan2016-10-271-0/+2
| | |
* | | Merge pull request #8183 from mattharrigan/ediff1d-performanceStephan Hoyer2016-10-241-0/+6
|\ \ \ | |/ / | | | Ediff1d performance
| * | TST: Added cases for better coverage of ediff1dMattHarrigan2016-10-211-0/+6
| | |
* | | 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
| | | |
* | | | ENH: add signature argument to vectorize for vectorizing like generalized ↵Stephan Hoyer2016-10-171-0/+154
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | ENH: allow numpy.apply_along_axis() to work with ndarray subclasses (#7918)Ben Rowland2016-10-111-0/+31
| | | | | | | | | | | | | | | | | | | | | 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.
* | BUG: lib: Simplify (and fix) pad's handling of the pad_widthWarren Weckesser2016-09-171-0/+18
| | | | | | | | | | | | | | | | 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.
* | 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-022-31/+33
| | | | | | | | | | | | 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 #7936 from goerz/sparse-type-checkStephan Hoyer2016-08-171-0/+35
|\ \ | | | | | | ENH: improve duck typing inside iscomplexobj
| * | ENH: improve duck typing inside iscomplexobjMichael Goerz2016-08-151-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|/ /
* | Merge pull request #7347 from erensezener/generalized_rot90Charles Harris2016-06-222-45/+77
|\ \ | | | | | | 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-202-33/+70
| | |
* | | TST: Test that polyfit raises if not enough data for cov estimate.Charles Harris2016-06-151-1/+7
| | | | | | | | | | | | Also a slight refactoring of np.polyfit.
* | | Merge pull request #4073 from endolith/patch-2Charles Harris2016-06-151-1/+25
|\ \ \ | | | | | | | | 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
| * | | 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: fix handling of right edge of final bin.Robert Kern2016-05-251-0/+5
| | | |
* | | | 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
| | | |
* | | | TST: fix test errors for Pathlib usage tests in io.py.Ralf Gommers2016-05-151-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pathlib was only added to the stdlib in Python 3.4, and there it can handle string type input for a file with UTF8 encoding. But the Patlib version on PyPi that can be installed for Python 2.7 doesn't accept strings, gives errors like: ====================================================================== ERROR: test_ndfromtxt (test_io.TestPathUsage) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/rgommers/Code/numpy/numpy/testing/decorators.py", line 147, in skipper_func return f(*args, **kwargs) File "/home/rgommers/Code/numpy/numpy/lib/tests/test_io.py", line 1888, in test_ndfromtxt f.write('1 2\n3 4') TypeError: must be unicode, not str
* | | | ENH: linear interpolation of complex values in lib.interpPeter Creasey2016-05-121-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Merge pull request #7618 from ahaldane/gradient_docstringCharles Harris2016-05-111-0/+3
|\ \ \ \ | | | | | | | | | | BUG: distance arg of np.gradient must be scalar, fix docstring
| * | | | BUG: distance arg of np.gradient must be scalar, fix docstringAllan Haldane2016-05-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixups to docstring, and disallow non-scalars as the distance args to np.gradient. Fixes #7548, fixes #6847
* | | | | BUG: Cast size to int64 when loading from archivedrasmuss2016-05-091-0/+14
|/ / / / | | | | | | | | | | | | | | | | Prevents overflow errors for large arrays on systems where the default int type is int32.
* | | | ENH: Add support for pathlib.Path objects to save/load functionsWendell Smith2016-04-061-1/+101
| | | |
* | | | Merge pull request #7421 from pwolfram/nancumsumprodStephan Hoyer2016-03-261-1/+106
|\ \ \ \ | | | | | | | | | | ENH: adds np.nancumsum and np.nancumprod
| * | | | ENH: adds np.nancumsum and np.nancumprodPhillip J. Wolfram2016-03-241-1/+106
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds an implementation of `nancumsum` and `nancumprod`. The actual function is a two-liner adapted from `nansum`. Its structure is adapted from PR: https://github.com/numpy/numpy/pull/5418/
* | | | | TST: check reference counts of dtypes after calling bincountJaime Fernandez2016-03-211-4/+19
| | | | |
* | | | | Merge pull request #7341 from inesw/bug-fix-6469Charles Harris2016-03-171-0/+6
|\ \ \ \ \ | | | | | | | | | | | | TST: Add test for #6469
| * | | | | TST: test for #6469Ines Wichert2016-02-291-0/+6
| | | | | |
* | | | | | 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.
* | | | | | BUG: Incorrect handling of range in `histogram` with automatic bins.Joseph Fox-Rabinovitz2016-03-161-12/+12
| |/ / / / |/| | | | | | | | | | | | | | | | | | | Fixes #7411. Tests and documentation updated. Fixes other small issues with range and bin count computations.