We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2017de0 commit 957030cCopy full SHA for 957030c
pyerrors/fits.py
@@ -168,12 +168,12 @@ def func_b(a, x):
168
'''
169
output = Fit_result()
170
171
- if (type(x) == dict and type(y) == dict and type(func) == dict):
+ if (isinstance(x, dict) and isinstance(y, dict) and isinstance(func, dict)):
172
xd = {key: anp.asarray(x[key]) for key in x}
173
yd = y
174
funcd = func
175
output.fit_function = func
176
- elif (type(x) == dict or type(y) == dict or type(func) == dict):
+ elif (isinstance(x, dict) or isinstance(y, dict) or isinstance(func, dict)):
177
raise TypeError("All arguments have to be dictionaries in order to perform a combined fit.")
178
else:
179
x = np.asarray(x)
0 commit comments