| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Also add a hint to the documentation advising the use of moveaxis over rollaxis.
Tests for rollaxis are left alone.
|
|
|
|
|
|
|
| |
This is the case for x in {int, bool, str, float, complex, object}.
Using the np.{x} version is deceptive as it suggests that there is a
difference. This change doesn't affect any external behaviour. The
`long` type is missing in python 3, so np.long is still useful
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TST: Added tests for `n` parameter
Added test for `datetime64` type change
Added tests for axis normalization
Added test for subtype handling
DOC: Minor updates to docs:
Added explanation for `n==0`
Added documentation describing `datetime64` handling
Updated formatting
Added call to normalize_axis_index
|
| |
|
|
|
|
| |
This isn't the case for `diff`
|
| |
|
| |
|
| |
|
|\
| |
| | |
MAINT: Don't internally use the one-argument where
|
| |
| |
| |
| | |
nonzero is a clearer spelling
|
|/
|
|
| |
Bare except is very rarely the right thing
|
|\
| |
| | |
MAINT: Combine similar branches
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The np.vstack function is maintained for backward compatibility, it's use in new code is discouraged.
* MAINT: Replace internal uses of vstack
vstack is supported only for backward compatibility
We should use concatenate or stack instead
* MAINT: Remove 1d special casing in piecewise
* STY: Fix missing blank line in ma.tests.test_extras.py
|
| |
|
|
|
|
| |
Fixes #2522
|
| |
|
| |
|
|
|
|
| |
This fixes an omission where duplicate axes would only be detected when positive
|
|
|
|
|
|
|
| |
This also means that its axis argument invokes operator.index like
others do.
_validate_axis currently accepts lists of axes, which is a bug.
|
|
|
|
| |
Add "np." prefix to meshgrid calls for consistency
|
|
|
|
| |
Fixes #8696
|
|
|
|
|
|
|
| |
Including missing backticks around link, included a missing colon in
example and removed excessive indentation before "doctest skip directive".
[skip ci]
|
|\
| |
| | |
ENH: add dtype.ndim
|
| | |
|
|\ \
| | |
| | | |
DOC: Added note to np.diff
|
| |/
| |
| |
| | |
Also noted that type is preserved.
[ci skip]
|
|/
|
|
| |
Closes #8687.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
As a result, some exceptions change from ValueError to IndexError
This also changes the exception types raised in places where
normalize_axis_index is not quite appropriate
|
|\
| |
| | |
BUG: Copy meshgrid after broadcasting
|
| |
| |
| |
| | |
Also, remove some unused variables
|
|/ |
|
| |
|
|
|
| |
The gradient function uses 1st order central difference in the interior, not second order.
|
|
|
| |
"it's arguments" should be "its arguments"
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|\
| |
| | |
BUG: np.piecewise not working for scalars
|
| | |
|
|\ \
| |/
|/| |
Fixed meshgrid to return arrays with same dtype as arguments.
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| | |
The strings in error messages were left untouched
|
| | |
|
| |
| |
| | |
Histogram documentation was missing an 'a' in the phrase 'all around performance'.
|