summaryrefslogtreecommitdiff
path: root/numpy/polynomial/tests/test_hermite_e.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2019-03-11 23:49:54 -0700
committerEric Wieser <wieser.eric@gmail.com>2019-03-16 10:04:58 -0700
commit0764929543c85decde9d664367dbf7d8f137fe1f (patch)
tree54901a64ac4fec1a52ab48808767309fc7ce4cab /numpy/polynomial/tests/test_hermite_e.py
parent5646b46341240ddecc1692d21610e49125b4b16e (diff)
downloadnumpy-0764929543c85decde9d664367dbf7d8f137fe1f.tar.gz
DEP: polynomial: Be stricter about integral arguments
This changes the behavior for: * The `deg` and `axis` arguments of `<type>der` * The `deg` and `axis` arguments of `<type>int` * The `deg` argument of `<type>gauss` * The `deg` argument of `<type>vander2d` * The `deg` argument of `<type>vander3d` The old behavior was: * Raise `ValueError` if the argument is a float, but not an integral one * Allow a float like `1.0` to mean `1`. This is inconsistent with most other integer-accepting APIs in numpy, which require these to be actual integers, and raise TypeError when they are not. The new behavior is: * Raise `TypeError` if the argument is a float, but not an integral one * Emit a `DeprecationWarning` if a float like `1.0` is passed, continuing to allow it its old meaning.
Diffstat (limited to 'numpy/polynomial/tests/test_hermite_e.py')
-rw-r--r--numpy/polynomial/tests/test_hermite_e.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/polynomial/tests/test_hermite_e.py b/numpy/polynomial/tests/test_hermite_e.py
index ccb44ad73..434b30e7b 100644
--- a/numpy/polynomial/tests/test_hermite_e.py
+++ b/numpy/polynomial/tests/test_hermite_e.py
@@ -209,12 +209,12 @@ class TestIntegral(object):
def test_hermeint(self):
# check exceptions
- assert_raises(ValueError, herme.hermeint, [0], .5)
+ assert_raises(TypeError, herme.hermeint, [0], .5)
assert_raises(ValueError, herme.hermeint, [0], -1)
assert_raises(ValueError, herme.hermeint, [0], 1, [0, 0])
assert_raises(ValueError, herme.hermeint, [0], lbnd=[0])
assert_raises(ValueError, herme.hermeint, [0], scl=[0])
- assert_raises(ValueError, herme.hermeint, [0], axis=.5)
+ assert_raises(TypeError, herme.hermeint, [0], axis=.5)
# test integration of zero polynomial
for i in range(2, 5):
@@ -311,7 +311,7 @@ class TestDerivative(object):
def test_hermeder(self):
# check exceptions
- assert_raises(ValueError, herme.hermeder, [0], .5)
+ assert_raises(TypeError, herme.hermeder, [0], .5)
assert_raises(ValueError, herme.hermeder, [0], -1)
# check that zeroth derivative does nothing