File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ def key(i):
349349 return sorted (items , key = key , reverse = True )
350350
351351
352- def avoid_symbolic (default_val ):
352+ def avoid_symbolic (default = None ):
353353 """
354354 Decorator to avoid calling a function where doing so will result in symbolic
355355 computation being performed. For use if symbolic computation may be slow. In
@@ -360,25 +360,25 @@ def _avoid_symbolic(func):
360360 def wrapper (* args ):
361361 if any (isinstance (expr , sympy .Basic ) for expr in args ):
362362 # An argument is symbolic, so give up and assume default
363- return default_val
363+ return default
364364
365365 try :
366366 return func (* args )
367367 except TypeError :
368- return default_val
368+ return default
369369
370370 return wrapper
371371
372372 return _avoid_symbolic
373373
374374
375- @avoid_symbolic (False )
375+ @avoid_symbolic (default = False )
376376def smart_lt (a , b ):
377377 """An Lt that gives up and returns False if supplied a symbolic argument"""
378378 return bool (a < b )
379379
380380
381- @avoid_symbolic (False )
381+ @avoid_symbolic (default = False )
382382def smart_gt (a , b ):
383383 """A Gt that gives up and returns False if supplied a symbolic argument"""
384384 return bool (a > b )
You can’t perform that action at this time.
0 commit comments