def norm(self, axis=None):
        if axis not in (0, 1, None):
            raise ValueError("Axis must be 0, 1 or None")

        if axis is None:
            return np.linalg.norm(self.matrix.data)

        summed = self.multiply(self).sum(axis).sqrt()

        return summed
Helper function of cholesky.
dataset/ETHPy150Open jimmycallin/pydsm/pydsm/indexmatrix.py/IndexMatrix.norm--crossover with--dataset/ETHPy150Open sympy/sympy/sympy/matrices/dense.py/DenseMatrix._cholesky