def set_affinity_matrix(self, affinity_mat):
        affinity_mat = check_array(affinity_mat, accept_sparse=sparse_formats)
        if affinity_mat.shape[0] != affinity_mat.shape[1]:
            raise ValueError("affinity matrix is not square")
        self.affinity_matrix = affinity_mat
Parameters
dataset/ETHPy150Open mmp2/megaman/megaman/geometry/geometry.py/Geometry.set_affinity_matrix