Skip to content
Snippets Groups Projects

Remove floor, ceiling for integer symbols

1 file
+ 11
0
Compare changes
  • Side-by-side
  • Inline
+ 11
0
@@ -49,6 +49,17 @@ else:
@@ -49,6 +49,17 @@ else:
__str__ = assignment_str
__str__ = assignment_str
_print_Assignment = print_assignment_latex
_print_Assignment = print_assignment_latex
 
# Apparently, in SymPy 1.4 Assignment.__hash__ is not implemented. This has been fixed in current master
 
try:
 
sympy_version = sp.__version__.split('.')
 
 
if int(sympy_version[0]) <= 1 and int(sympy_version[1]) <= 4:
 
def hash_fun(self):
 
return hash((self.lhs, self.rhs))
 
Assignment.__hash__ = hash_fun
 
except Exception:
 
pass
 
def assignment_from_stencil(stencil_array, input_field, output_field,
def assignment_from_stencil(stencil_array, input_field, output_field,
normalization_factor=None, order='visual') -> Assignment:
normalization_factor=None, order='visual') -> Assignment:
Loading