def load_similarity_matrix(self,filepath,num_items,offset=1):
        """
        Load a precomputed similarity matrix from tsv.

        Parameters
        ==========
        filepath : str
            Filepath to tsv file holding externally computed similarity matrix.
        num_items : int
            Total number of items (might exceed highest ID in a sparse similarity matrix).
        offset : int
            Item index offset i.e. 1 if indices in file are 1-indexed.
        """
        y = np.loadtxt(filepath)
        row = y[:,0]
        col = y[:,1]
        data = y[:,2]
        idx = offset-np.array([row,col],dtype='int32')
        self.similarity_matrix = csr_matrix((data,idx),(num_items,num_items))
dataset/ETHPy150Open Mendeley/mrec/mrec/item_similarity/recommender.py/ItemSimilarityRecommender.load_similarity_matrix/swapped operands of `-`