-
Notifications
You must be signed in to change notification settings - Fork 33
WIP: PR: Lofi fixes and improvements #1561
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
base: dev
Are you sure you want to change the base?
Conversation
Updates from dev
…A-OWP/inundation-mapping into dev-probabilistic-inundation Merge divergent branch
…A-OWP/inundation-mapping into dev-probabilistic-inundation
…into dev Mergin remote repo updates
…into dev Latest changes
[3pt] Lofi fixes
arrays.append(data) | ||
|
||
merged = np.max(arrays, axis=0) | ||
merged[np.where(merged == -10000)] = 127 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged[merged==-10000]
is going to much more performant and memory efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't think of a case where one would need to use np.where
with a single argument. There are other, much better, alternatives. The documentation of np.where
makes note of this.
[Short description explaining the high-level reason for the pull request]
Additions
Changes
Removals
Testing
Deployment Plan (For developer use)
How does the changes affect the product?
Issuer Checklist (For developer use)
You may update this checklist before and/or after creating the PR. If you're unsure about any of them, please ask, we're here to help! These items are what we are going to look for before merging your code.
[_pt] PR: <description>
dev
branch (the default branch), you have a descriptive Feature Branch name using the format:dev-<description-of-change>
(e.g.dev-revise-levee-masking
)dev
branchpre-commit
hooks were run locally4.x.x.x
Merge Checklist (For Technical Lead use only)