summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-11-14 14:20:07 -0500
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2018-12-04 15:26:30 -0500
commitbd1d6a5d51cda6fdac6986669962e6e79f425656 (patch)
treee15094766f5eb42f037bfe2058d8332e9e7aceda /numpy
parent82428bb72589c6fd781689feb1f501a6a29c6fdc (diff)
downloadnumpy-bd1d6a5d51cda6fdac6986669962e6e79f425656.tar.gz
TST,BUG: fix two tests that were setup incorrectly.
And which failed with the change to linspace.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_function_base.py4
-rw-r--r--numpy/lib/tests/test_histograms.py8
2 files changed, 5 insertions, 7 deletions
diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py
index d0ff1c15f..e0940c04b 100644
--- a/numpy/core/tests/test_function_base.py
+++ b/numpy/core/tests/test_function_base.py
@@ -285,9 +285,7 @@ class TestLinspace(object):
@property
def __array_interface__(self):
- # Ideally should be `'shape': ()` but the current interface
- # does not allow that
- return {'shape': (1,), 'typestr': '<i4', 'data': self._data,
+ return {'shape': (), 'typestr': '<i4', 'data': self._data,
'version': 3}
def __mul__(self, other):
diff --git a/numpy/lib/tests/test_histograms.py b/numpy/lib/tests/test_histograms.py
index 49c0d9720..fa66cb517 100644
--- a/numpy/lib/tests/test_histograms.py
+++ b/numpy/lib/tests/test_histograms.py
@@ -289,13 +289,13 @@ class TestHistogram(object):
def test_object_array_of_0d(self):
# gh-7864
assert_raises(ValueError,
- histogram, [np.array([0.4]) for i in range(10)] + [-np.inf])
+ histogram, [np.array(0.4) for i in range(10)] + [-np.inf])
assert_raises(ValueError,
- histogram, [np.array([0.4]) for i in range(10)] + [np.inf])
+ histogram, [np.array(0.4) for i in range(10)] + [np.inf])
# these should not crash
- np.histogram([np.array([0.5]) for i in range(10)] + [.500000000000001])
- np.histogram([np.array([0.5]) for i in range(10)] + [.5])
+ np.histogram([np.array(0.5) for i in range(10)] + [.500000000000001])
+ np.histogram([np.array(0.5) for i in range(10)] + [.5])
def test_some_nan_values(self):
# gh-7503