def __init__(self, c_data: _C_MultiHMatrix, **params):
        # Users should use one of the two constructors below.

        self.c_data = c_data
        self.shape = (self.lib.multi_nbrows(c_data), self.lib.multi_nbcols(c_data))
        self.size = self.lib.nbhmats(c_data)


        self.lib.getHMatrix.restype=ctypes.POINTER(_C_HMatrix)
        self.lib.getHMatrix.argtypes=[ctypes.POINTER(_C_MultiHMatrix), ctypes.c_int]

        self.hmatrices = []
        for l in range(0,self.size):
            c_data_hmatrix = self.lib.getHMatrix(self.c_data,l)
            self.hmatrices.append(HMatrix(c_data_hmatrix,**params))


        self.params = params.copy()