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
While the example with decode works as expected, using the example with decode_batch returns the following error:
Traceback (most recent call last):
File "/home/accel-team/ciceroa/MWPM-pyMatching/test-pymatching2.py", line 12, in <module>
predicted_observables = matching.decode_batch(syndrome)
File "/home/accel-team/ciceroa/MWPM-pyMatching/.venv-pymatch/lib/python3.10/site-packages/pymatching/matching.py", line 419, in decode_batch
predictions, weights = self._matching_graph.decode_batch(
ValueError: resize only works on single-segment arrays
Is this due to a not specified library dependency?
The text was updated successfully, but these errors were encountered:
Thanks for flagging this. This issue has been caused by the recent release of numpy 2.0. You might consider downgrading to pip install numpy==1.26.4 while I get this fixed.
Same issue experienced on my end on a simple decoding using a check matrix and an 8-bit trivial syndrome. Maybe a first fix could to explicitly restrict the numpy dependency to major version 1.x.x until support for numpy 2.x.x is complete, in the pymatching toml file?
I've pinned to numpy==1.* in #100, which is now released in pymatching v2.2.1 on pypi.
Ideally pymatching would support numpy v2, however that will require fixing a bug introduced when updating the the required version of pybind11. Since this problem is described in the open issue #102, I'll close this issue since the pin to numpy v1 fixes it in the meantime.
While the example with decode works as expected, using the example with decode_batch returns the following error:
Is this due to a not specified library dependency?
The text was updated successfully, but these errors were encountered: