def save(self,filename):
        '''
        Writes the BEE distance matrix to file. WARNING: DOES NOT HANDLE MASK MATRICES CORRECTLY!
        '''
        if filename.endswith('.mtx'):
            # save a BEE formated matrix
            self.saveBeeFormat(filename)
        elif filename.endswith('.mat'):
            # save a matlab formated matrix
            if self.is_distance:
                matrix_name = 'dist_matrix'
            else:
                matrix_name = 'sim_matrix'
            spio.savemat(filename, {matrix_name:self.matrix})
        else:
            return NotImplementedError(filename%"Unsupported matrix format for filename %s")
dataset/ETHPy150Open bolme/pyvision/src/pyvision/analysis/bee.py/BEEDistanceMatrix.save/swapped operands of `%`