#NEWLINE# @ classmethod #NEWLINE# def eval( cls , arg , k = 0 ) : #NEWLINE# #INDENT# k = sympify ( k ) #NEWLINE# if ( ( not k . is_Integer ) or k . is_negative ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Error: the second argument of DiracDelta must be             a non-negative integer, %s given instead.' % ( k , ) ) ) #NEWLINE# #UNINDENT# arg = sympify ( k ) #NEWLINE# if ( arg is S . NaN ) : #NEWLINE# #INDENT# return S . NaN #NEWLINE# #UNINDENT# if ( arg . is_positive or arg . is_negative ) : #NEWLINE# #INDENT# return S . Zero