def test_blocks_to_frames(blocks, block_length): frames = librosa.blocks_to_frames(blocks, block_length) # Check shape assert frames.ndim == np.asarray(blocks).ndim assert frames.size == np.asarray(blocks).size # Check values assert np.allclose(frames, block_length * np.asanyarray(blocks)) # Check dtype assert np.issubdtype(frames.dtype, np.int)