summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | MAINT: Replace unicode() with u prefixEric Wieser2017-03-252-5/+2
| | | | |
* | | | | MAINT: Stop using sixu instead of a u prefixEric Wieser2017-03-251-2/+1
| | | | |
* | | | | MAINT: Remove asbytes_nested where b prefixes would sufficeEric Wieser2017-03-253-35/+33
| | | | |
* | | | | MAINT: Remove asbytes where a b prefix would sufficeEric Wieser2017-03-253-48/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we only need to support python 2, we can remove any case where we just pass a single string literal and use the b prefix instead. What we can't do is transform asbytes("tests %d" % num), because %-formatting fails on bytes in python 3.x < 3.5.
* | | | | Merge pull request #8807 from eric-wieser/poly1d-fixes-fixes-fixesCharles Harris2017-03-211-0/+14
|\ \ \ \ \ | | |_|_|/ | |/| | | TST: Prove that poly1d coeffs are immutable
| * | | | TST: Prove that poly1d coeffs are immutableEric Wieser2017-03-211-0/+14
| | | | | | | | | | | | | | | | | | | | Remove the comment suggesting that they are not
* | | | | Merge pull request #8762 from eric-wieser/poly1d-fixesCharles Harris2017-03-141-0/+9
|\ \ \ \ \ | |/ / / / | | | | | BUG: Prevent crash in poly1d.__eq__
| * | | | BUG: Prevent crash in poly1d.__eq__Eric Wieser2017-03-091-0/+9
| | | | | | | | | | | | | | | | | | | | Fixes #8760
* | | | | Merge pull request #8750 from warut-vijit/masterEric Wieser2017-03-081-0/+7
|\ \ \ \ \ | |/ / / / |/| | | | BUG: Fix np.average for object arrays
| * | | | BUG: Fix np.average with object array weightsDuke Vijitbenjaronk2017-03-071-0/+7
| | | | | | | | | | | | | | | | | | | | Fixes #8696
* | | | | BUG: Make MaskedArray.argsort and MaskedArray.sort consistentEric Wieser2017-03-071-0/+12
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Previously, these had different rules for unmasking values, and even different arguments to decide how to do so. Fixes #8664
* | | | Merge pull request #8646 from joshloyal/enh-inplace-nan_to_numEric Wieser2017-02-241-0/+10
|\ \ \ \ | | | | | | | | | | ENH: Allow for an in-place nan_to_num conversion
| * | | | ENH: Allow for an in-place nan_to_num conversion. Fixes #8634Joshua Loyal2017-02-201-0/+10
| | |/ / | |/| |
* | | | ENH: gradient support for unevenly spaced dataAlessandro Pietro Bardelli2017-02-221-42/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This somehow reverts #7618 and solves #6847, #7548 by implementing support for unevenly spaced data. Now the behaviour is similar to that of Matlab/Octave function. As argument it can take: 1. A single scalar to specify a sample distance for all dimensions. 2. N scalars to specify a constant sample distance for each dimension. i.e. `dx`, `dy`, `dz`, ... 3. N arrays to specify the coordinates of the values along each dimension of F. The length of the array must match the size of the corresponding dimension 4. Any combination of N scalars/arrays with the meaning of 2. and 3.
* | | | MAINT: Be specific about where AxisError is raisedEric Wieser2017-02-201-2/+2
| | | | | | | | | | | | | | | | These were tested by temporarily removing the base classes from AxisError
* | | | BUG: fix wrong odd determination in packbitsJulian Taylor2017-02-191-0/+9
|/ / / | | | | | | | | | closes gh-8637
* | | Merge pull request #8614 from eric-wieser/apply_along_axis-emptyMarten van Kerkwijk2017-02-181-0/+19
|\ \ \ | | | | | | | | BUG: Don't leak internal exceptions when given an empty array
| * | | BUG: Don't leak internal exceptions when given an empty arrayEric Wieser2017-02-131-0/+19
| | | | | | | | | | | | | | | | Fixes #7454
* | | | BUG: The broadcast shape of no things should be (), not ValueErrorEric Wieser2017-02-131-1/+1
| | | |
* | | | BUG: Copy meshgrid after broadcasting, fixing #8561Eric Wieser2017-02-131-0/+10
|/ / / | | | | | | | | | Also, remove some unused variables
* | | Merge pull request #8441 from eric-wieser/apply_along_axis-ndStephan Hoyer2017-02-111-9/+85
|\ \ \ | | | | | | | | BUG: Fix crash on 0d return value in apply_along_axis
| * | | TST: Verify apply_along_axis now works on masked arraysEric Wieser2017-02-111-0/+14
| | | | | | | | | | | | | | | | | | | | Note that this is not a full subsitute for np.ma.apply_along_axis, as that allows functions to return a mix of np.ma.masked and scalars
| * | | BUG: Work around evil matrix.__array_prepare__Eric Wieser2017-02-111-3/+9
| | | |
| * | | BUG: Fix crash on 0d return value in apply_along_axisEric Wieser2017-02-111-6/+62
| | | | | | | | | | | | | | | | | | | | | | | | Also: ENH: Support arbitrary dimensionality of return value MAINT: remove special casing
* | | | BUG: Make iscomplexobj compatible with custom dtypes againJoerg Behrmann2017-02-101-0/+9
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | This change makes iscomplexobj compatible with custom array types using custom dtypes, that are not fully compatible to Numpys dtypes, which can nevertheless be coerced to a numpy array with asarray again, as has been the behaviour before PR #7936. Fixes #8601
* | | Merge pull request #8326 from juliantaylor/vectorize-packbitsCharles Harris2017-01-201-1/+178
|\ \ \ | | | | | | | | ENH: Vectorize packbits with SSE2
| * | | TST: add extended packbits testsJulian Taylor2017-01-121-1/+178
| | | | | | | | | | | | | | | | | | | | Larger data to account for future vectorization. Also add benchmarks for packbits and unpackbits
* | | | BUG: fix wrong masked median for some special casesJulian Taylor2017-01-171-0/+12
|/ / / | | | | | | | | | | | | | | | | | | the masked nans which are equivalent to valid infs must be replaced with infs earlier otherwise the inf is lost in the masked sum of the low and high part. Closes gh-8487
* | | BUG: Fix apply_along_axis() for when func1d() returns a non-ndarray (#8426)Ben Rowland2016-12-311-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * BUG: Closes issue #8419 Fixes issue in apply_along_axis() where func1d() returns a non ndarray * BUG: Fix apply_along_axis() when func1d() returns a non-ndarray Closes issue #8419. Fixes issue in apply_along_axis() where func1d() returns a non ndarray by calling asanyarray() on result. This commit fixes a too long line in the test case.
* | | Merge pull request #8364 from juliantaylor/masked-median-nanCharles Harris2016-12-121-12/+30
|\ \ \ | | | | | | | | BUG: handle unmasked NaN in ma.median like normal median
| * | | BUG: handle unmasked NaN in ma.median like normal medianJulian Taylor2016-12-121-12/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-111-1/+5
|/ / / | | | | | | | | | Closes gh-8220
* | | MAINT: Other cleanup Python < 2.7 and Python3 < 3.4Alexandr Shadchin2016-12-092-17/+4
| | |
* | | BUG: Apply more robust string converts in loadtxtgfyoung2016-12-081-0/+9
|/ / | | | | | | | | | | | | | | | | | | 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-191-5/+2
| | | | | | | | | | | | 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-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