| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This seems to solve the problem everywhere. It's not clear if this works on PyPy.
Fixes gh-9328
|
| | |
| | |
| | |
| | | |
It's still possible to create duplicate MaskedConstants through `.copy()`
|
| | | |
|
|\ \ \
| | | |
| | | | |
BUG: make np.transpose return a view of the mask
|
| | | |
| | | |
| | | |
| | | | |
Fixes gh-8506 and fixes gh-7483
|
| | | | |
|
| | | | |
|
| |_|/
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This commit attempts to make structure assignment more consistent, and
then changes multi-field indices to return a view instead of a copy.
Assignment between structures now works "by field position" rather than
"by field name".
Fixes #2353, fixes #6085, fixes #3351, fixes #6085, fixes #6314,
fixes #2346, fixes #7058, fixes #3641, fixes #5994, fixes #7262,
fixes #7493
|
|\ \ \
| |/ /
| | | |
BUG: Fix loss of masks in masked 0d methods
|
| | |
| | |
| | |
| | |
| | |
| | | |
This also prevents `.squeeze()` from ever returning `masked`, which was incorrect
Fixes gh-9430.
|
| | | |
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| | |
This allows pytest to run with duplicate test file names. Note that
`python <path-to-test-file>` no longer works with this change, nor will
a simple `pytest numpy`, because numpy is imported from the numpy
repository. However, `python runtests.py` and `>>> numpy.test()` are
still available.
|
| |
| |
| |
| |
| |
| | |
I don't know what that argument was used for, but it showis up in old
tests and is not explicitly used within the tests. I assume it was part
of an old testing framework and is now longer needed.
|
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
|
|\ \
| | |
| | | |
MAINT: Use new-style classes on 2.7
|
| | |
| | |
| | |
| | | |
Deliberately avoids tests, to prevent introducing a failure on old-style classes later.
|
|/ / |
|
|\ \
| | |
| | | |
ENH: Rearrange testing module to isolate nose dependency.
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
|\
| |
| | |
BUG: np.ma.astype fails on structured types
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These now:
* Return void scalars instead of tuples for structured dtypes
* Actually accept non-trivial dtype arguments
* Work for nested structured and subarray dtypes
* Uniformly convert scalar types into dtypes
Also fixes #9315
|
| | |
|
| |
| |
| |
| | |
Tests for gh-8069
|
| | |
|
| |
| |
| |
| | |
Fill values were not correctly calculated for subdtypes, instead returning `None`
|
|/ |
|
|\
| |
| | |
BUG, DEP: Fix masked arrays to properly edit views. ( #5558 )
|
| | |
|
| | |
|
| |
| |
| |
| | |
Bare except is very rarely the right thing
|
| |
| |
| |
| |
| |
| |
| |
| | |
isinstance(obj, ndarray) will return False if (obj is None) in any case,
so no need to check whether (obj is not None) before it. All tests
pass on my build (the most recent one at the time making this PR).
However, this might have been done for backward compatibility. Will see
how the CI tests do.
|
| | |
|
|\ \
| | |
| | | |
ENH: Add isnat function and make comparison tests NAT specific
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This may show warnings in downstream projects, which should likely
not be there. We could also drop in the normal assert_equal there,
which would support NaT, and NaN, but checks for scalarness, which
this currently does not (which also could create problems).
Works around the only test with this problem, by using the normal
assert_equal there.
|
| | |
| | |
| | |
| | | |
Also, remove unecessary subclasses
|
| | |
| | |
| | |
| | | |
Introduced by me in #8918
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This does not match np.maximum, which is confusing because the masked
version has no documentation at all. This uses a similar deprecation approach
to gh-8918, noting that the warning is only needed for arrays of more than one
dimension.
The same remarks apply to `np.ma.minimum`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This shorthand is just inconsistent with `np.maximum`, and just makes the
distinction between `np.ma.max` and `np.ma.maximum` even more confusing.
Also adds names to these objects, since 1) they're there in core, and 2) they
make the warning message more helpful.
|
|/ /
| |
| |
| |
| |
| | |
This was untested, and the documentation did not mention how it differed from `min` anyway.
Fixes #8764
|
|\ \
| | |
| | | |
DEP: deprecate calling ma.argsort without an axis
|
| | |
| | |
| | |
| | |
| | |
| | | |
Only deprecated when this would be ambiguous.
Approaches #8701
|
| | | |
|