First of all, great project, really wonderful to have it available as libre and open source code!
I was trying to run some of my scripts from 2022 in python3.12, and apparently numpy developers removed np.product at some point. So I get the following error when computing covariance matrix:
File "...\site-packages\symfit\core\fit.py", line 574, in execute
minimizer_ans.covariance_matrix = self.covariance_matrix(
^^^^^^^^^^^^^^^^^^^^^^^
File ...\site-packages\symfit\core\fit.py", line 278, in covariance_matrix
cov_matrix = self._covariance_matrix(best_fit_params,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "...\site-packages\symfit\core\fit.py", line 256, in _covariance_matrix
raw_dof = np.sum([np.product(shape) for shape in self.data_shapes[1]])
^^^^^^^^^^
File "...\site-packages\numpy\__init__.py", line 428, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'product'
If I change np.product to np.prod all works as expected. I think it's the only place in all of symfit, where np.product is used. So I would suggest to change the code. Alternatively, one needs to fix the numpy version.
Hello!
First of all, great project, really wonderful to have it available as libre and open source code!
I was trying to run some of my scripts from 2022 in python3.12, and apparently numpy developers removed
np.product
at some point. So I get the following error when computing covariance matrix:If I change
np.product
tonp.prod
all works as expected. I think it's the only place in all ofsymfit
, wherenp.product
is used. So I would suggest to change the code. Alternatively, one needs to fix the numpy version.