It seems there is a problem with the snsynth/mwem.py script. When running it, I encountered the following error:
574 if any([a > 0 for a in mins_data]):
575 warnings.warn("Data should be preprocessed to have 0 based indices.")
--> 576 dimensionality = np.product(dims_sizes)
577 if dimensionality > 1e8:
578 warnings.warn(f"Dimensionality of histogram is {dimensionality:,}, consider using splits.")
File /opt/conda/lib/python3.12/site-packages/numpy/__init__.py:414, in __getattr__(attr)
411 import numpy.char as char
412 return char.chararray
--> 414 raise AttributeError("module {!r} has no attribute "
415 "{!r}".format(__name__, attr))
AttributeError: module 'numpy' has no attribute 'product'
This error occurs because numpy.product has been deprecated in NumPy version 1.25.0.
The fix is straightforward—simply change np.product on line 576 to np.prod.
It seems there is a problem with the
snsynth/mwem.py
script. When running it, I encountered the following error:This error occurs because numpy.product has been deprecated in NumPy version 1.25.0. The fix is straightforward—simply change np.product on line 576 to np.prod.