Skip to content
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

Expand compatibility to older Python/NumPy versions #16

Merged
merged 2 commits into from
Jun 16, 2024

Conversation

TeetotalingTom
Copy link

@TeetotalingTom TeetotalingTom commented Jun 15, 2024

The existing version of Igor2 is only compatible with Python >V3.9 - the pyproject.toml file suggests V3.8 is permitted, but NumPy V1.25.1 enforces Python V3.9. Unfortunately, many high performance computers and Ubuntu releases come with older Python versions, making Igor2 and packages depending on it incompatible without requiring a Python update.

The incompatibility of Igor2 currently exists because older combinations of Python+NumPy do not automatically show the data type if the data type size equals the default size for that type on the operating system. I have modified the functionality of pprint.pformat in helper.py file such that the data type of every array is now printed automatically. The tests have been updated accordingly to specify the data type automatically everywhere.

I have performed the tests with Python V3.7+NumPy V1.21.5 as well as Python V3.10+NumPy V1.26.4, and the code passes all the tests for both version combinations. It would probably work for even older versions of Python, but I have not tested that.

@paulmueller
Copy link
Member

Thanks! It looks like we are having a numpy 2.0 compatibility issue with np.complex_ vs np.complex128 in the current code. -> #17

@paulmueller paulmueller merged commit d792810 into AFM-analysis:master Jun 16, 2024
0 of 9 checks passed
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

Successfully merging this pull request may close these issues.

2 participants