input needs to be 4d array (2d array of 2d arrays)

def from2dBlocks(arr):
    """
    input needs to be 4d array (2d array of 2d arrays)
    """
    s = arr.shape
    s0, s1 = s[0] * s[2], s[1] * s[3]
    return unblockshaped(arr.reshape(s[0] * s[1], s[2], s[3]), s0, s1)