def test_reshuffle(signal, sl): sig = signal.isig[sl] array = np.concatenate([ a for a in sig._block_iterator( flat_signal=True, navigation_mask=None, signal_mask=None) ], axis=0) ndim = sig.axes_manager.navigation_dimension ans = _reshuffle_mixed_blocks(array, ndim, sig.data.shape[ndim:], sig.data.chunks[:ndim]) np.testing.assert_allclose(ans, sig.data.compute())
def test_reshuffle(signal, sl): sig = signal.isig[sl] array = np.concatenate( [a for a in sig._block_iterator(flat_signal=True, navigation_mask=None, signal_mask=None)], axis=0 ) ndim = sig.axes_manager.navigation_dimension ans = _reshuffle_mixed_blocks(array, ndim, sig.data.shape[ndim:], sig.data.chunks[:ndim]) np.testing.assert_allclose(ans, sig.data.compute())