summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
* DEP: Remove FutureWarning from np.lib.split and go to future.Charles Harris2015-10-301-18/+12
| | | | | | | | | | | | | | | Previously an empty array resulting from split always had dimension 1-D. In Numpy 1.9 a FutureWarning was raised to notify users that it was planned to preserve the dimensions of empty arrays in a future numpy release. This removes the FutureWarning and implements preservation of dimensions. Note that there was a bug in numpy 1.9 and the dimensions of empty arrays was already preserved in some cases and no warning was issued. This PR fixes that inconsistency by preserving the dimensions in all cases rather than fixing the bug, as the dimension preserving behavior was already depended on by some users. See the discussion in gh-6575 about this change.
* TST: attempt to make test_load_refcount deterministicNathaniel J. Smith2015-10-281-6/+11
| | | | | | Use a different strategy to detect whether np.load creates cycles. Fixes gh-6571, I hope.
* Merge pull request #6562 from ahaldane/disable_view_safety_checksCharles Harris2015-10-261-10/+0
|\ | | | | Disable view safety checks
| * TST: Remove tests of view safety checks (see next commit)Allan Haldane2015-10-261-10/+0
| | | | | | | | | | Remove unit tests for the view safety chekcs, which are to be reverted in the next commit.
* | BUG: error in broadcast_arrays with as_strided arrayStephan Hoyer2015-10-241-0/+8
|/ | | | Fixes GH6491
* BUG: Make median work for empty arrays (issue #6462)Ethan Kruse2015-10-211-0/+28
| | | | | np.median([]) returns NaN. Fixes bug/regression that raised an IndexError. Added tests to ensure continued support of empty arrays.
* TST: new np.corrcoef improved stabilityLars Buitinck2015-10-051-0/+6
|
* Merge pull request #6371 from seberg/pr-5771Charles Harris2015-09-271-0/+9
|\ | | | | BUG: Make sure warning for array split is always applied
| * TST: Test empty warning for split with manual inputsSebastian Berg2015-09-271-0/+9
| |
* | TST: Update test__version.py.Charles Harris2015-09-231-0/+13
| | | | | | | | | | | | | | Added tests for the x.x.dev0+1234567 form together with alpha and beta versions of same. Updates lifted from scipy.
* | Merge pull request #6271 from charris/change-deprecated-indexes-to-errorCharles Harris2015-09-101-6/+12
|\ \ | | | | | | DEP,MAINT: Change deprecated indexing to errors.
| * | DEP,MAINT: Change deprecated indexing to errors.Charles Harris2015-09-061-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The deprecated operations changed to errors are * Conversion of floats and booleans to npy_intp indexes. * Conversion of single element integer arrays of ndim > 1 to indexes. * Multiple ellipsis in index. The affected deprecation tests have been been changed to check for raised errors instead, but remain in test_deprecations.py for the moment. They will be moved when the conversion of the remaining indexing deprecations is complete.
* | | possibility to calculate gradient over specific axes instead of all axesMaximilian Trescher2015-09-031-0/+25
|/ / | | | | | | when given axis=None, behave the same as axis not being provided
* | Auto merge of #6206 - jaimefrio:searchsorted_ndarray, r=njsmithHomu2015-08-171-0/+9
|\ \ | | | | | | | | | | | | MANT: searchsorted should return base ndarrays always
| * | MANT: searchsorted should return base ndarrays alwaysJaime Fernandez2015-08-161-0/+9
| | |
* | | ENH: Adding in automatic number of bins estimation for np.histogram. Users ↵Varun Nayyar2015-08-151-0/+90
|/ / | | | | | | can now pass in bins='auto' (or 'scott','fd','rice','sturges') and get the corresponding rule of thumb estimator provide a decent estimate of the optimal number of bins for the given the data.
* | Clarify signature of numpy.pad.Antony Lee2015-08-071-1/+1
| | | | | | | | | | `mode` is a required argument so just declare it as such. This does not prevent it from being passed as a keyword argument.
* | BUG: fixed regression in np.histogram which caused input floating-point ↵Thomas Robitaille2015-07-271-0/+7
| | | | | | | | values to be modified
* | STY: PEP8 and pyflakes fixes for numpy/lib/testsCharles Harris2015-07-253-237/+296
| |
* | Merge pull request #6046 from charris/pep8-and-pyflakes-cleanupsCharles Harris2015-07-252-10/+11
|\ \ | | | | | | | | | | | | PEP8 and pyflakes fixups for numpy/ma/*.py and numpy/ma/tests/*.py Merge cleanups prior to 1.10 release.
| * | BUG: Fix imports in test_io.py and test_recfunctions.py.Charles Harris2015-07-042-10/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those test functions were incorrectly importing test functions from numpy/ma/testutils that were actually not defined there, but rather in numpy/testing. That did not cause an error when testutils was '*' importing all the test functions, but it was deceptive as some of the functions might appear to support masked arrays when they do not.
* | | ENH: Faster algorithm for computing histograms with equal-size binsThomas Robitaille2015-07-231-0/+31
| | |
* | | BUG: Fix tiling of zero-sized arrays numpy/numpy#6089 and add test case.Dimas Abreu Dutra2015-07-171-0/+3
| | |
* | | BUG: made view of new array to fix ix_ bugmlai2015-07-111-0/+9
|/ / | | | | | | | | | | closes gh-6062 done with help of Sebastian Berg! =)
* | Updating unit tests for removed warning.empeeu2015-06-221-3/+3
| |
* | BUG: Added proper handling of median and percentile when nan's are present ↵empeeu2015-06-221-1/+177
| | | | | | | | | | | | in array to close issue #586. Also added unit tests.
* | BUG: np.float16 not recognized in np.common_typeMarten van Kerkwijk2015-06-221-2/+4
| |
* | ENH: structured datatype safety checksAllan Haldane2015-06-051-0/+30
| | | | | | | | | | | | | | | | | | Previously views of structured arrays containing objects were completely disabled. This commit adds more lenient check for whether an object-array view is allowed, and adds similar checks to getfield/setfield Fixes #2346. Fixes #3256. Fixes #2599. Fixes #3253. Fixes #3286. Fixes #5762.
* | BUG: fix _broadcast_shape (and broadcast_array) for len(args) > 32Stephan Hoyer2015-05-151-0/+5
| | | | | | | | Fixes gh-5862
* | ENH: add 'fweights' and 'aweights' arguments to covariance calculations.tpoole2015-05-131-5/+72
| | | | | | | | | | 'fweights' allows integer frequencies to be specified for observation vectors, and 'aweights' provides a more general importance or probabalistic weighting.
* | BUG: setdiff1d return dtypeChristian Brodbeck2015-05-071-1/+3
| | | | | | | | | | Fixes #5846 (If called with an empty array as first argument, the returned array had dtype bool instead of the dtype of the input array)
* | Merge pull request #5805 from jaimefrio/ix_intpCharles Harris2015-05-051-1/+29
|\ \ | | | | | | Ix intp
| * | BUG: Fix handling of non-empty ndarraysJaime Fernandez2015-05-041-8/+12
| | |
| * | TST: Added tests for ix_Jaime Fernandez2015-04-271-1/+25
| | |
* | | BUG: fixes segfault in np.place when vals is emptybehzad nouri2015-05-041-0/+8
|/ /
* | Merge pull request #4612 from Nodd/loadtxt_commentsCharles Harris2015-04-231-3/+37
|\ \ | | | | | | ENH: Multiple comment tokens in loadtxt
| * | ENH: Multiple comment tokens in loadtxtJoseph Martinot-Lagarde2015-04-221-3/+37
| | |
* | | ENH: add options for disabling use of pickle in load/savePauli Virtanen2015-04-181-0/+16
| |/ |/|
* | Merge pull request #5713 from cowlicks/bug-5712Charles Harris2015-04-051-0/+44
|\ \ | | | | | | Fix read_array_header_*
| * | TST: tests for format.read_array_header_* and test read_magicBlake Griffith2015-04-011-0/+44
| |/
* | TST: Test nan_to_num with integer list input.Charles Harris2015-04-031-0/+2
|/
* ENH: deprecate bias and ddof arguments to corrcoefMatthew Brett2015-03-151-10/+28
| | | | | | | The bias and ddof arguments had no effect on the calculation of the correlation coefficient because the value cancels in the calculation. Deprecate these arguments to np.corrcoef and np.ma.corrcoef.
* Merge pull request #5585 from Kreiswolke/BugFixTileJaime2015-03-121-0/+6
|\ | | | | BUG: Fixed issue #4679 - make numpy.tile always return a copy
| * BUG: Fixed issue #4679 and added testOliver Eberle2015-02-191-0/+6
| | | | | | | | | | Tile now copies the input when it is a numpy array and all dimensions are repeated only once.
* | Merge pull request #5519 from jaimefrio/array_interface_dtypeCharles Harris2015-03-121-0/+23
|\ \ | | | | | | ENH: PyArray_FromInterface checks descr if typestr is np.void
| * | ENH: PyArray_FromInterface checks descr if typestr is np.voidjaimefrio2015-03-081-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the 'typestr' member of the __array_interface__ dictionary defines a np.void dtype, check the 'descr' member, and if it is a valid dtype description and it is not the default one, use it to construct the dtype for the array to return. This fixes #5081, as as_strided no longer has to worry about changing the dtype of the return.
* | | BUG: loadtxt fails with complex data in Python 3.Charles Harris2015-03-111-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that the Python complex type constructor only accepts a pair of numbers or a string, unlike other numeric types it does not work with byte strings. The numpy error is subtle, as loadtxt opens the file in the default text mode, but then converts the input lines to byte strings when they are split into separate values. The fix here is to convert the values back to strings in the complex converter. Closes #5655.
* | | STY: fold long linesPauli Virtanen2015-03-081-2/+2
| | |
* | | BUG: enable working around pickle compatibility issues on Py3 in npy filesPauli Virtanen2015-03-085-1/+66
| | | | | | | | | | | | | | | | | | Add pickle compatibility flags to numpy.save and numpy.load. Allow only combinations that cannot corrupt binary data in Numpy arrays. Use the same default values as Python pickle.
* | | BUG: genfromtxt gave OverflorError for large integersThomas Robitaille2015-03-062-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | Fix StringConverter to avoid OverflowError in genfromtxt. Before, int(2**66) would work (and return a ‘long’) but then np.array([2**66], dtype=np.integer) would not work and return an OverflowError which would propagate to genfromtxt. This commit fixes this by ensuring testing in advance whether an OverflowError will occur. In addition, this adds an explicit np.int64 entry on systems where integer means int32. Values larger than 2**63-1 will be cast as float. This includes a regression test and adds an entry to the release notes.