def test_bin_2d(self): arr = np.array([[1, 1, 1, 1, 1, 1, 1], [2, 2, 2, 2, 2, 2, 2]]) assert np.all(DataStore.bin_2d(arr, 2) == np.array([[1, 1, 1], [2, 2, 2]]))