summaryrefslogtreecommitdiff
path: root/silx/math/test/test_histogramnd_nominal.py
diff options
context:
space:
mode:
authorPicca Frédéric-Emmanuel <picca@debian.org>2017-10-07 07:59:01 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2017-10-07 07:59:01 +0200
commitbfa4dba15485b4192f8bbe13345e9658c97ecf76 (patch)
treefb9c6e5860881fbde902f7cbdbd41dc4a3a9fb5d /silx/math/test/test_histogramnd_nominal.py
parentf7bdc2acff3c13a6d632c28c4569690ab106eed7 (diff)
New upstream version 0.6.0+dfsg
Diffstat (limited to 'silx/math/test/test_histogramnd_nominal.py')
-rw-r--r--silx/math/test/test_histogramnd_nominal.py21
1 files changed, 18 insertions, 3 deletions
diff --git a/silx/math/test/test_histogramnd_nominal.py b/silx/math/test/test_histogramnd_nominal.py
index f4550e4..9f97521 100644
--- a/silx/math/test/test_histogramnd_nominal.py
+++ b/silx/math/test/test_histogramnd_nominal.py
@@ -666,8 +666,6 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
self.assertTrue(np.array_equal(histo, expected_h))
self.assertTrue(cumul is None)
-
-
def test_nominal_last_bin_closed(self):
"""
"""
@@ -842,7 +840,6 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
self.assertTrue(np.array_equal(histo, expected_h))
self.assertTrue(np.allclose(cumul, expected_c, rtol=10e-15))
-
def test_accumulate_no_weights_at_init(self):
"""
"""
@@ -883,6 +880,24 @@ class _Test_Histogramnd_nominal(unittest.TestCase):
self.assertTrue(np.array_equal(histo, expected_h))
self.assertTrue(np.array_equal(cumul, expected_c))
+ def testNoneNativeTypes(self):
+ type = self.sample.dtype.newbyteorder("B")
+ sampleB = self.sample.astype(type)
+
+ type = self.sample.dtype.newbyteorder("L")
+ sampleL = self.sample.astype(type)
+
+ histo_inst = Histogramnd(sampleB,
+ self.histo_range,
+ self.n_bins,
+ weights=self.weights)
+
+ histo_inst = Histogramnd(sampleL,
+ self.histo_range,
+ self.n_bins,
+ weights=self.weights)
+
+
class Test_chistogram_nominal_1d(_Test_chistogramnd_nominal):
ndims = 1