Functor for the BLOCKDIAG projector.
It sets all values to zero except for the diagonal blocks of the support defined by block_shapes. The i-th diagonal block starts at the row and column indices (block_shapes[i-1][0], block_shapes[i-1][1]) or (0,0) if i == 0 and ends at the row and columns indices (block_shapes[i][0]-1, block_shapes[i][1]-1) or (shape[0], shape[1]) if i == len(block_shapes)-1.
>>> import numpy as np
>>> M = np.ones((12,12))
>>> p = blockdiag(M.shape, [(1, 1), (4, 4), (7, 7)], normalized=False)
>>> M_ = p(M)
>>> M_
array([[1., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.],
[0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0.],
[0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0.],
[0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0.],
[0., 1., 1., 1., 1., 0., 0., 0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.],
[0., 0., 0., 0., 0., 1., 1., 1., 1., 1., 1., 1.]])