You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/symengine/basic.rb
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -14,14 +14,14 @@ def abs
14
14
SymEngine::abs(self)
15
15
end
16
16
defto_proc(*args)
17
-
if(args.length == 0)
18
-
ifself.free_symbols.count > 1
19
-
raiseArgumentError,"Too many free symbols! Only 1 allowed. Found #{self.free_symbols.count}."
17
+
ifargs.empty?
18
+
iffree_symbols.count > 1
19
+
raiseArgumentError,"You should provide symbols order for #to_proc. Only formulae with 1 free symbol can deduce its name automatically (#{free_symbols.count} found in #{self})."
raiseArgumentError,"#{self.free_symbols.count}Free Symbols. Only #{args.length} given."
23
+
iffree_symbols.count > args.length
24
+
raiseArgumentError,"Formula contains #{free_symbols.count}free symbols. You should provide at least this number of arguments (only #{args.length} given)."
0 commit comments