This was merged on master but really should be on features: we should not
add new dependencies in bug-fix releases
This reverts commits:
* cfaf3600c1
* 14a9b1ec83
When a test with pytest.raises(ValueError, match='foo') doesn't raise, the
following error is printed:
Failed: DID NOT RAISE <class 'ValueError'> matching 'foo'
This error message is confusing as it implies a ValueError was raised, but the
message wasn't matching 'foo'.
I first considered rewording it somehow to preserve the match pattern in it, but
I don't think that's worthwhile as the pattern should usually be apparent from
the stacktrace anyways (hard-coded, as parametrization, or with --showlocals for
more sophisticated cases).
Previously I was subverting the natural order of operations by
subclassing from `ndarray`, but it turns out that you can tell just
numpy to call your operator instead of its by setting the
`__array_priority__` attribute on your class. This is much simpler, and
it turns out the be a little more robust, too.
- Avoid importing numpy unless necessary.
- Mention numpy arrays and dictionaries in the docs.
- Add numpy to the list of tox dependencies.
- Don't unnecessarily copy arrays or allocate empty space for them.
- Use code from compat.py rather than writing py2/3 versions of things
myself.
- Avoid reimplementing __repr__ for built-in types.
- Add an option to consider NaN == NaN, because sometimes people use NaN
to mean "missing data".