Exemple #1
0
 def test_with_alignment(self):
     data = np.asarray([4.6, 7.3])
     the_binning = binnings.fixed_width_binning(data, 1.0, align=True)
     assert np.allclose(the_binning.numpy_bins, [4, 5, 6, 7, 8])
Exemple #2
0
 def test_with_alignment(self):
     data = np.asarray([4.6, 7.3])
     the_binning = binnings.fixed_width_binning(data, 1.0, align=True)
     assert np.allclose(the_binning.numpy_bins, [4, 5, 6, 7, 8])
Exemple #3
0
 def test_without_alignment(self):
     data = np.asarray([4.6, 7.3])
     the_binning = binnings.fixed_width_binning(data, 1.0, align=False)
     assert np.allclose(the_binning.numpy_bins, [4.6, 5.6, 6.6, 7.6])
Exemple #4
0
 def test_without_alignment(self):
     data = np.asarray([4.6, 7.3])
     the_binning = binnings.fixed_width_binning(data, 1.0, align=False)
     assert np.allclose(the_binning.numpy_bins, [4.6, 5.6, 6.6, 7.6])