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

Fix comparison with NAN in heatmap.py #34

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

hengky-kurniawan-1
Copy link
Contributor

@hengky-kurniawan-1 hengky-kurniawan-1 commented Nov 13, 2024

Background

This PR resolves #28, where the use of np.NAN in heatmap.py causes an AttributeError in NumPy version 2.1. To resolve this, all instances of np.NAN are replaced with np.nan, ensuring compatibility with both current and future versions of NumPy, as recommended by the NumPy stable documentation and the NumPy 1.26 documentation.

Current Behavior

Using np.NAN results in AttributeError: module 'numpy' has no attribute 'NAN', causing errors in NumPy 2.1.

Expected Behavior

The code will now use np.nan for NaN handling, eliminating the AttributeError and ensuring compatibility across NumPy versions.

@hengky-kurniawan-1 hengky-kurniawan-1 changed the title Fix comparison with NaN in heatmap.py Fix comparison with NAN in heatmap.py Nov 13, 2024
@PeterWaIIace
Copy link
Collaborator

Thank you!

@PeterWaIIace PeterWaIIace merged commit 099fd77 into NativeSensors:main Nov 13, 2024
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.

AttributeError: module 'numpy' has no attribute 'NAN'. Did you mean: 'nan'?
2 participants