What causes this error (AttributeError: ‘Mul’ object has no attribute ‘cos’) in Python?
Your problem is with namespace clash, here from sympy import * from numpy import * Since both numpy and and sympy have their own definition of cos. The error is telling you that the Mul object (which is n*x) does not have a cosine method, since the interpreter is now confused between the sympy and … Read more