File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1644,6 +1644,7 @@ class Max(Function):
1644
1644
1645
1645
func = __class__
1646
1646
1647
+
1647
1648
class Min (Function ):
1648
1649
1649
1650
def __new__ (cls , *args ):
@@ -1661,8 +1662,14 @@ class Min(Function):
1661
1662
1662
1663
func = __class__
1663
1664
1665
+
1664
1666
class Derivative (Basic ):
1665
1667
1668
+ def __new__ (self , expr , *variables ):
1669
+ if len (variables) == 1 and is_sequence(variables[0 ]):
1670
+ return diff(expr, * variables[0 ])
1671
+ return diff(expr, * variables)
1672
+
1666
1673
@property
1667
1674
def is_Derivative (self ):
1668
1675
return True
@@ -1676,9 +1683,6 @@ class Derivative(Basic):
1676
1683
def variables (self ):
1677
1684
return self .args[1 :]
1678
1685
1679
- def __new__ (self , expr , *variables ):
1680
- return diff(expr, * variables)
1681
-
1682
1686
def _sympy_ (Basic self ):
1683
1687
cdef RCP[const symengine.Derivative] X = \
1684
1688
symengine.rcp_static_cast_Derivative(self .thisptr)
You can’t perform that action at this time.
0 commit comments