Skip to content

Commit

Permalink
Fixed FutureWarning for comparing with None
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Roelfs committed Dec 5, 2016
1 parent b00726d commit aa4d8a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion symfit/core/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ def covariance_matrix(self, best_fit_params):
:param best_fit_params: ``dict`` of best fit parameters as given by .best_fit_params()
:return: covariance matrix.
"""
if None in self.sigma_data.values():
if any(element is None for element in self.sigma_data.values()):
return np.array(
[[float('nan') for p in self.model.params] for p in self.model.params]
)
Expand Down

0 comments on commit aa4d8a1

Please sign in to comment.