'Loads a sparse matrix stored as npz file.'

@staticmethod
def LoadSparse(inputfile, verbose=False):

    npzfile = np.load(inputfile)
    mat = sp.csr_matrix((npzfile['data'], npzfile['indices'], npzfile['indptr']), shape=tuple(list(npzfile['shape'])))
    if verbose:
        print ('Loaded    sparse    matrix    from    %s    of    shape    %s' % (inputfile, mat.shape.__str__()))
    return mat
