You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem while solving my own problem. I tried to fit connected equations with shared parameters, but I get an error, so then I just try to get the result passing random numbers to the model and get the same error. Following error appears even if I change the model function some other ones (e.g. I tried a simple sum of all params and vars).
Traceback (most recent call last):
File C:\Miniconda3\lib\site-packages\symfit\core\support.py:264 in __get__
return getattr(obj, self.cache_attr)
AttributeError: 'Model' object has no attribute '_cached_numerical_components'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File C:\Miniconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
exec(code, globals, locals)
File c:\...\error.py:14
zfit = model(x=34, y=46, y0=-70, gamma=1, h=34, r0=2346, alpha=0.865).z1
File C:\Miniconda3\lib\site-packages\symfit\core\models.py:706 in __call__
return ModelOutput(self.keys(), self.eval_components(*args, **kwargs))
File C:\Miniconda3\lib\site-packages\symfit\core\models.py:647 in eval_components
components = dict(zip(self, self.numerical_components))
File C:\Miniconda3\lib\site-packages\symfit\core\support.py:267 in __get__
setattr(obj, self.cache_attr, self.fget(obj))
File C:\Miniconda3\lib\site-packages\symfit\core\models.py:852 in numerical_components
components.append(sympy_to_py(expr, ordered))
File C:\Miniconda3\lib\site-packages\symfit\core\support.py:105 in sympy_to_py
lambdafunc = lambdify(args, func, dummify=False)
File C:\Miniconda3\lib\site-packages\sympy\utilities\lambdify.py:878 in lambdify
funcstr = funcprinter.doprint(funcname, iterable_args, _expr, cses=cses)
File C:\Miniconda3\lib\site-packages\sympy\utilities\lambdify.py:1141 in doprint
argstrs, expr = self._preprocess(args, expr)
File C:\Miniconda3\lib\site-packages\sympy\utilities\lambdify.py:1209 in _preprocess
s = self._argrepr(arg)
File C:\Miniconda3\lib\site-packages\sympy\printing\codeprinter.py:163 in doprint
lines = self._print(expr).splitlines()
File C:\Miniconda3\lib\site-packages\sympy\printing\printer.py:309 in _print
return getattr(expr, self.printmethod)(self, **kwargs)
File C:\Miniconda3\lib\site-packages\symfit\core\argument.py:76 in _sympystr
return printer.doprint(self.name)
File C:\Miniconda3\lib\site-packages\sympy\printing\codeprinter.py:156 in doprint
expr = self._handle_UnevaluatedExpr(expr)
File C:\Miniconda3\lib\site-packages\sympy\printing\codeprinter.py:116 in _handle_UnevaluatedExpr
return expr.replace(re, lambda arg: arg if isinstance(
TypeError: Basic.replace() missing 1 required positional argument: 'value'
As you see I use anaconda.
python==3.10.13
symfit==0.5.6
sympy==1.12
numpy==1.26.0
scipy==1.11.3
I checked could my code working on the oldest version and I found out that it works with symfit==0.4.6 (sympy==1.1.1) but when I add second equation to the model another error occurs.
The text was updated successfully, but these errors were encountered:
I have a problem while solving my own problem. I tried to fit connected equations with shared parameters, but I get an error, so then I just try to get the result passing random numbers to the model and get the same error. Following error appears even if I change the model function some other ones (e.g. I tried a simple sum of all params and vars).
My simplified code:
The error I got:
As you see I use anaconda.
python==3.10.13
symfit==0.5.6
sympy==1.12
numpy==1.26.0
scipy==1.11.3
I checked could my code working on the oldest version and I found out that it works with symfit==0.4.6 (sympy==1.1.1) but when I add second equation to the model another error occurs.
The text was updated successfully, but these errors were encountered: