Skip to content
Snippets Groups Projects
Commit e457402d authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Add MutableDenseMatrix as exception to is_array_like

parent d700df44
No related branches found
No related tags found
No related merge requests found
Pipeline #20779 passed
...@@ -99,7 +99,7 @@ def is_array_like(a): ...@@ -99,7 +99,7 @@ def is_array_like(a):
return (hasattr(a, '__array__') return (hasattr(a, '__array__')
or isinstance(a, pycuda.gpuarray.GPUArray) or isinstance(a, pycuda.gpuarray.GPUArray)
or ('tensorflow' in str(type(a)) and 'Tensor' in str(type(a))) or ('tensorflow' in str(type(a)) and 'Tensor' in str(type(a)))
or 'torch.Tensor' in str(type(a))) and not isinstance(a, sympy.Matrix) or 'torch.Tensor' in str(type(a))) and not isinstance(a, (sympy.Matrix, sympy.MutableDenseMatrix))
def tf_constant_from_field(field, init_val=0): def tf_constant_from_field(field, init_val=0):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment