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

arrayglyph/replace array by masked array #78

Merged
merged 5 commits into from
Jul 23, 2024

Conversation

MAfarrag
Copy link
Member

@MAfarrag MAfarrag commented Jul 23, 2024

Internal improvement

  • replace the normal numpy array in the constructor method by masked array in order not to convert all input arrays to float32.
  • Now all the arrays will stay the same type as they have ben given, so if the array is int the mask (np.nan) will be stored in the array without converting it to float.
  • Now we don't need to use the prepare_array method to scale the values if they are already between 0-255 which matplotlib already understand.
  • the percentile/surface_reflectance parameters to the constructor method are None by default, so no processing is done to the given array except when the previous parameters are given.

Check relevant points.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

all the tests passed plus manual check for the example scripts.

Checklist:

  • updated version number in setup.py/pyproject.toml
  • updated environment.yml and the lock file
  • added changes to History.rst
  • updated the latest version in README file
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@MAfarrag MAfarrag merged commit 469b17b into main Jul 23, 2024
6 checks passed
@MAfarrag MAfarrag deleted the array_glyph/replace-array-by-masked-array branch July 23, 2024 23:10
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.

1 participant