Skip to content

numpy v1.24.0 breaks reader IBW #266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jotelha opened this issue Dec 20, 2022 · 3 comments
Closed

numpy v1.24.0 breaks reader IBW #266

jotelha opened this issue Dec 20, 2022 · 3 comments

Comments

@jotelha
Copy link
Collaborator

jotelha commented Dec 20, 2022

With numpy 1.24.0, I get

Traceback (most recent call last):
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/.snakemake/scripts/tmp3d17vir4.build_feature_matrix.py", line 10, in <module>
    import SurfaceTopography as ST
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/SurfaceTopography/__init__.py", line 31, in <module>
    from .Container import SurfaceContainer, read_container, read_published_container  # noqa: F401
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/SurfaceTopography/Container/__init__.py", line 27, in <module>
    from .IO import read_container, read_published_container  # noqa: F401
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/SurfaceTopography/Container/IO.py", line 43, in <module>
    from ..IO import open_topography
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/SurfaceTopography/IO/__init__.py", line 41, in <module>
    from .IBW import IBWReader
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/SurfaceTopography/IO/IBW.py", line 29, in <module>
    from igor.binarywave import load as loadibw
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/venv/lib/python3.8/site-packages/igor/binarywave.py", line 110, in <module>
    1:_numpy.complex, # NT_CMPLX, makes number complex.
  File "/mnt/dat2/git/ContactEngineering/SurfaceTopographyML-floor-tile/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 'complex'

due to this line https://github.com/wking/igor/blob/41952c5fa352fdbe95557a759cdc057fe3ee74f9/igor/binarywave.py#L110 in the igor/binarywave dependency. This does not happen with numpy v 1.23.5.

@pastewka
Copy link
Contributor

There was a deprecation warning about this earlier. We need to fix IGOR, although I am not sure how active the project still is.

@pastewka
Copy link
Contributor

There is a pull request on igor that addresses this: wking/igor#4 - however, the last commit to igor was in 2016, I am not sure if this will ever be fixed. We may need to implement native IBW support.

@pastewka
Copy link
Contributor

I've limited the numpy version in #268 - this is off course only a temporary solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants