def similarity(self,fir1,fir2):
        '''Compute the similarity of two faces'''
        assert self.trained == True

        if self.measure == PCA_L1:
            return (np.abs(fir2-fir1)).sum()

        if self.measure == PCA_L2:
            return np.sqrt(((fir1-fir2)*(fir1-fir2)).sum())

        if self.measure == PCA_COS:
            return (fir1*fir2).sum()
        
        raise NotImplementedError("Unknown distance measure: %d"%self.measure)
dataset/ETHPy150Open bolme/pyvision/src/pyvision/face/PCA.py/PCA.similarity/swapped operands of `-`