def test_make_bivariate_histogram(self): x, y = np.ones((100, 100)), np.ones((100, 100)) make_bivariate_histogram( x_position=x, y_position=y, histogram_range=None, masked=None, bins=200, spatial_std=3, )
def test_single_negative_x_y(self): size = 100 x, y = -np.ones(size), np.ones(size) s = make_bivariate_histogram(x, y) hist_iX = s.axes_manager[0].value2index(-1) hist_iY = s.axes_manager[1].value2index(1) assert s.data[hist_iY, hist_iX] == size s.data[hist_iY, hist_iX] = 0 assert not s.data.any()
def test_single_x(self): size = 100 x, y = np.ones(size), np.zeros(size) s = make_bivariate_histogram(x, y) hist_iX = s.axes_manager[0].value2index(1.0) hist_iY = s.axes_manager[1].value2index(0.0) assert s.data[hist_iY, hist_iX] == size s.data[hist_iY, hist_iX] = 0 assert not s.data.any()