Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'int' object has no attribute 'is_Mul' #14

Open
AMzaheri opened this issue Jul 22, 2022 · 0 comments
Open

AttributeError: 'int' object has no attribute 'is_Mul' #14

AMzaheri opened this issue Jul 22, 2022 · 0 comments

Comments

@AMzaheri
Copy link

Hello,

I’ve been trying to run the adjoin modeling example, but I encountered the following error. I was wondering if you could advise me how to solve it.
The error is:

Traceback (most recent call last):
File "/FWI/adjoint.py", line 48, in
stencil_v = Eq(v.backward, solve(pde, v.backward)[0])
File "
/.conda/envs/devito/lib/python3.10/site-packages/sympy/solvers/solvers.py", line 1038, in solve
if fi.is_constant():
File "/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/expr.py", line 628, in is_constant
expr = expr.simplify()
File "
/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/basic.py", line 1763, in simplify
return simplify(self, **kwargs)
File "/.conda/envs/devito/lib/python3.10/site-packages/sympy/simplify/simplify.py", line 746, in simplify
expr = short.xreplace(hollow_mul)
File "
/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/basic.py", line 1183, in xreplace
value, _ = self._xreplace(rule)
File "/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/basic.py", line 1198, in _xreplace
a_xr = _xreplace(rule)
File "
/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/basic.py", line 1198, in _xreplace
a_xr = _xreplace(rule)
File "/local/devito/devito/finite_differences/derivative.py", line 225, in _xreplace
return self._new_from_self(subs=subs), True
File "
/local/devito/devito/finite_differences/derivative.py", line 202, in _new_from_self
return Derivative(expr, *self.dims, **_kwargs)
File "/local/devito/devito/finite_differences/derivative.py", line 107, in new
obj._ppsubs = as_tuple(frozendict(i) for i in kwargs.get("subs", []))
File "
/local/devito/devito/tools/utils.py", line 49, in as_tuple
t = tuple(item)
File "/local/devito/devito/finite_differences/derivative.py", line 107, in
obj._ppsubs = as_tuple(frozendict(i) for i in kwargs.get("subs", []))
File "/local/devito/devito/tools/data_structures.py", line 456, in init
self._dict = self.dict_cls(*args, **kwargs)
File "
/.conda/envs/devito/lib/python3.10/site-packages/sympy/core/rules.py", line 57, in getitem
if self._filter(key):
File "~/.conda/envs/devito/lib/python3.10/site-packages/sympy/simplify/simplify.py", line 741, in
x.is_Mul and
AttributeError: 'int' object has no attribute 'is_Mul'

Thank you,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant