#NEWLINE# def errors( self , y ) : #NEWLINE# #INDENT# if ( y . ndim != y . y_pred . ndim ) : #NEWLINE# #INDENT# raise TypeError ( 'y should have the same shape as self.y_pred' , ( 'y' , y . type , 'y_pred' , self . y_pred . type ) ) #NEWLINE# #UNINDENT# if y . dtype . startswith ( 'int' ) : #NEWLINE# #INDENT# return T . mean ( T . neq ( self . y_pred , y ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise NotImplementedError ( )