@@ -28,10 +28,10 @@ def symbols ary_or_string, *params
2828 end
2929 end
3030 def Function ( n )
31- return SymEngine ::UndefFunction . new ( n )
31+ SymEngine ::UndefFunction . new ( n )
3232 end
3333 def evalf ( operand , prec = 53 , real = false )
34- return _evalf ( operand , prec , real )
34+ _evalf ( operand , prec , real )
3535 end
3636 def lambdify ( exp , *syms )
3737 eval ( SymEngine ::Utils ::lambdify_code ( exp , syms ) )
@@ -43,7 +43,7 @@ class << self
4343 asin : 'Math.asin' , acos : 'Math.acos' , atan : 'Math.atan' ,
4444 sinh : 'Math.sinh' , cosh : 'Math.cosh' , tanh : 'Math.tanh' ,
4545 asinh : 'Math.asinh' , acosh : 'Math.acosh' , atanh : 'Math.atanh' ,
46- pi : 'Math::PI' , E : 'Math::E' ,
46+ pi : 'Math::PI' , E : 'Math::E' , I : '::Complex::I' ,
4747 dirichlet_eta : 'SymEngine::Utils::evalf_dirichlet_eta' ,
4848 zeta : 'SymEngine::Utils::evalf_zeta' , gamma : 'Math.gamma' } . map { |from , to | [ /(\b #{ from } \b )/ , to ] } . to_h . freeze
4949 def evalf_dirichlet_eta ( exp )
@@ -53,7 +53,7 @@ def evalf_zeta(exp)
5353 SymEngine ::evalf ( SymEngine ::zeta ( exp ) )
5454 end
5555 def lambdify_code ( exp , syms )
56- str = exp . to_s
56+ str = exp . to_s
5757 sym_map = syms . join ( "," )
5858 str . gsub! ( /[\d \. ]+/ , 'Rational(\0,1)' )
5959 str = REPLACEMENTS . inject ( str ) { |res , ( from , to ) | res . gsub ( from , to ) }
0 commit comments