summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | TST: Remove unittest dependencies in numpy/lib/tests.Charles Harris2017-07-2417-328/+327
| | | |
* | | | BUG: float16 is promoted to float64 by gradientEric Wieser2017-07-131-0/+6
|/ / / | | | | | | | | | This isn't the case for `diff`
* | | Merge pull request #9362 from charris/rearrange-testing-moduleCharles Harris2017-07-062-4/+2
|\ \ \ | | | | | | | | ENH: Rearrange testing module to isolate nose dependency.
| * | | MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-042-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* | | | TST: join_by now works for dtypes with padding tooEric Wieser2017-07-011-0/+16
| | | | | | | | | | | | | | | | Once again, thanks to not using .descr
* | | | TST: Add failing test for mismatch of key typeEric Wieser2017-07-011-1/+16
| | | |
* | | | BUG: stack_arrays fails for subdtypesEric Wieser2017-07-011-0/+29
| | | | | | | | | | | | | | | | Again, fixed by not using descr
* | | | BUG: recfunctions.join_by fails when key is a subdtypeEric Wieser2017-07-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems that working with .descr is a generally terrible idea. Instead we introduce `get_fieldspec`, which returns a list of 2-tuples, encapsulating subdtypes. This also means that np.core.test_rational.rational survives a roundtrip - its .descr is 'V8', which ddoesn't survive
* | | | BUG: recfunctions.join_by fails for colliding values with different dtypesEric Wieser2017-07-011-0/+13
|/ / / | | | | | | | | | Fixes #9338
* | | TST: Verify that join_by doesn't choke on subdtypesEric Wieser2017-06-271-0/+10
| |/ |/|
* | BUG: Switched to xor for bool arrays in diff, added corresponding testsEgor Panfilov2017-06-171-1/+11
| |
* | BUG: KeyboardInterrupt is swallowed all over the placeEric Wieser2017-06-033-5/+5
| | | | | | | | Bare except is very rarely the right thing
* | BUG: have as_strided() keep custom dtypesAntoine Pitrou2017-05-241-0/+8
| | | | | | | | Fixes issue #9161
* | BUG: set default type for empty index array to `numpy.intp` (#9142)Konrad Kapp2017-05-201-0/+10
| | | | | | | | Fixes #9137
* | DEP: Deprecate incorrect behavior of expand_dims.Charles Harris2017-05-171-1/+22
|/ | | | | | | | | | | Expand_dims works as documented when the index of the inserted NewAxis in the resulting array satisfies -a.ndim - 1 <= index <= a.ndim. However, when index > a.ndim index is replaced by a.ndim and, when index < -a.ndim - 1, it is replaced by index + a.ndim + 1, which may be negative and results in incorrect placement. The latter two cases are now deprecated. Closes #9100.
* Merge pull request #9070 from ahaldane/silence_join_byEric Wieser2017-05-101-1/+14
|\ | | | | BUG: Preserve field order in join_by, avoids FutureWarning
| * BUG: Preserve field order in join_by, avoids FutureWarningAllan Haldane2017-05-091-1/+14
| | | | | | | | Fixes #8940
* | ENH: Spelling fixesVille Skyttä2017-05-092-3/+3
|/
* ENH: add divmod support to NDArrayOperatorsMixinStephan Hoyer2017-05-071-37/+55
|
* BUG: np.r_['r',...] crashes on scalarsEric Wieser2017-05-051-0/+5
|
* BUG: np.r_['rc'] is treated as np.r_['r'], not an errorEric Wieser2017-05-051-0/+2
|
* TST: Add some tests for passing r and c to r_Eric Wieser2017-05-051-0/+13
|
* BUG: Remove mutable state from AxisConcatenatorEric Wieser2017-05-051-0/+11
| | | | Fixes #8815
* ENH: Add isin, genereralizing in1d to ND arrays (#8423)B R S Recht2017-05-051-1/+41
| | | | | | This fixes gh-8331 Also update the docs for arraysetops to remove the outdated "1D" from the description, which was already incorrect for np.unique.
* ENH: add __pos__ to NDArrayOperatorsMixinStephan Hoyer2017-04-301-1/+1
|
* Merge pull request #9013 from eric-wieser/fix-nanfuncsCharles Harris2017-04-281-0/+12
|\ | | | | BUG: Fix np.lib.nanfunctions on object arrays
| * BUG: Fix incorrect behavior of nanfunctions on object arraysEric Wieser2017-04-291-0/+12
| | | | | | | | Fixes gh-8974 and gh-9008
* | Merge pull request #8996 from eric-wieser/fix-ufunclikeMarten van Kerkwijk2017-04-271-1/+33
|\ \ | |/ |/| BUG/DEP: Make ufunclike functions more ufunc-like
| * BUG: Return scalars from ufunclike objectsEric Wieser2017-04-261-0/+25
| | | | | | | | | | | | No need to reinvent the wheel here - the ufunc machinery will handle the out arguments Fixes #8993
| * DEP: Deprecate calling the `out` argument `y`Eric Wieser2017-04-261-1/+8
| | | | | | | | Fixes gh-8995
* | ENH: NDArrayOperatorsMixin calls ufuncs directly, like ndarrayStephan Hoyer2017-04-271-10/+7
| | | | | | | | | | | | | | | | | | * ENH: NDArrayOperatorsMixin calls ufuncs directly, like ndarray Per our discussion in https://github.com/numpy/numpy/pull/8247#discussion_r112825050 * add back in accidentally dropped __repr__
* | BUG: Fix ArrayLike(NDArrayOperatorsMixin) operations with object()Stephan Hoyer2017-04-271-6/+20
| |
* | ENH: Add NDArrayOperatorsMixin mixin class.Stephan Hoyer2017-04-271-0/+189
|/ | | | | | This mixin class provides an easy way to implement arithmetic operators that defer to __array_ufunc__ like numpy.ndarray in non-ndarray subclasses.
* Merge pull request #6632 from mcmtroffaes/feature/fromfile-ioopen-bugCharles Harris2017-04-141-2/+3
|\ | | | | TST/BUG: fromfile - fix test and expose bug with io class argument
| * BUG: npy_PyFile_Dup2 - fix PyFile_AsFile failing on io style classesMatthias C. M. Troffaes2016-09-081-2/+3
| | | | | | | | | | | | | | | | | | | | This bug only manifests itself in the Python 2 code path. Falls back to the current Python 3 code path also on Python 2 because the Python 3 code path is written precisely to handle this situation. Also fix tests, and clarify in the documentation that the current implementation requires the stream to be seekable.
* | Merge pull request #8643 from eric-wieser/fix-8642Eric Wieser2017-04-111-0/+15
|\ \ | | | | | | BUG: Fix double-wrapping of object scalars
| * | BUG: Fix double-wrapping of object scalarsEric Wieser2017-04-061-0/+15
| | | | | | | | | | | | Fixes #8642
* | | MAINT: Use _validate_axis inside _ureduceEric Wieser2017-03-282-16/+19
| | | | | | | | | | | | This fixes an omission where duplicate axes would only be detected when positive
* | | MAINT: Reuse _validate_axis in np.gradientEric Wieser2017-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | This also means that its axis argument invokes operator.index like others do. _validate_axis currently accepts lists of axes, which is a bug.
* | | Merge pull request #8388 from gfyoung/real-imag-scalarseberg2017-03-261-0/+40
|\ \ \ | | | | | | | | API: Return scalars for scalar inputs to np.real/imag
| * | | API: Return scalars for scalar inputs to np.real/imaggfyoung2017-03-251-0/+40
| | | | | | | | | | | | | | | | Closes gh-8386.
* | | | Merge pull request #8348 from anntzer/bincount-zero-minlengthEric Wieser2017-03-261-8/+7
|\ \ \ \ | |/ / / |/| | | ENH: Allow bincount(..., minlength=0).
| * | | ENH: Allow bincount(..., minlength=0).Antony Lee2017-03-241-8/+7
| | | |
* | | | 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__