def test_sparse_block_diag():
    x = _sparse_block_diag([sparse.eye(2, 2), sparse.eye(2, 2)])
    x = x - sparse.eye(4, 4)
    x.eliminate_zeros()
    assert_equal(len(x.data), 0)
Test sparse block diag replacement
dataset/ETHPy150Open mne-tools/mne-python/mne/tests/test_fixes.py/test_sparse_block_diag