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(DataArray): scalar data implies index 0 #2872

Merged
merged 1 commit into from
Jul 13, 2023
Merged

Conversation

floryst
Copy link
Collaborator

@floryst floryst commented Jul 13, 2023

Context

Calling getRange() and then getRange(0) on scalar data computes the range twice, when it should be computed once.

Results

  • Avoids recomputing the range of scalar data

Changes

  • DataArray.getRange now correctly caches the range

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js:
    • OS:
    • Browser:

getRange(0) should cache in the same slot as getRange() when dealing
with scalar data.
@floryst floryst requested a review from jourdain July 13, 2023 16:15
Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@floryst floryst added this pull request to the merge queue Jul 13, 2023
Merged via the queue into master with commit 218bf9d Jul 13, 2023
4 checks passed
@github-actions
Copy link

🎉 This PR is included in version 28.3.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants