Skip to content

Changing Argo float kernels to use boolean masking#2632

Draft
erikvansebille wants to merge 1 commit into
Parcels-code:mainfrom
erikvansebille:argo_boolean_indexing
Draft

Changing Argo float kernels to use boolean masking#2632
erikvansebille wants to merge 1 commit into
Parcels-code:mainfrom
erikvansebille:argo_boolean_indexing

Conversation

@erikvansebille
Copy link
Copy Markdown
Member

This PR changes the Kernels in the Argo tutorial to use boolean masking, which is easier to read than the np.where() clauses used before.

I'll create a script in the benchmarking repo so that we can test performance between the two types of vectorised if-statements (see also #2197)

Description

Checklist

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
    • Describe how you used it (e.g., by pasting your prompt):

Which is easier to read than the np.where() clauses used before

Performance can be tested in the benchmarking suite
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant