diff options
Diffstat (limited to 'silx/math/test/test_histogramnd_nominal.py')
-rw-r--r-- | silx/math/test/test_histogramnd_nominal.py | 21 |
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 |