v7labs/upolygon

Numpy >= 1.24.0 not supported due to np.int

Opened this issue · 1 comments

There is an np.int import in run_length_encoding.pyx which breaks when using numpy >= 1.24.0

Error:

>>> rle_encode(m)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "upolygon/run_length_encoding.pyx", line 12, in upolygon.run_length_encoding.rle_encode
  File "/home/robin/tc/software/services/machine-learning/.venv/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'int'

Hi Robin,

Thanks for raising this, we've currently pinned the numpy version at 1.23.0 for this reason, and have a task in to address soon the refactor necessary to allow this to upgrade back to our usual policy of latest-version.

Unfortunately, this does mean that if you have clashing versions, these are harder to make coexist, depending how you manage your dependencies.

Whilst numpy made this announcement in advance, the inclusion of it in a minor version upgrade was a surprise to me! It's a priority for the team and I to address. Thanks for your issue report.

Any further issues, please let me know.

Owen