Use optional keyword arguments for subset by wx4stg · Pull Request #70 · deeplycloudy/xlma-python · GitHub
Skip to content

Use optional keyword arguments for subset#70

Open
wx4stg wants to merge 3 commits into
deeplycloudy:masterfrom
wx4stg:subset_kw
Open

Use optional keyword arguments for subset#70
wx4stg wants to merge 3 commits into
deeplycloudy:masterfrom
wx4stg:subset_kw

Conversation

@wx4stg

@wx4stg wx4stg commented Aug 17, 2025

Copy link
Copy Markdown
Contributor

Allows subsetting without requiring all arguments. Backwards compatible with original behavior.

If a filter is provided without providing the relevant data array, an error is raised.

If the data arrays are not the same shape, an error is raised

Filters and data for the time variable are cast to numpy datetime64 first to allow, e.g., subsetting an array of numpy datetime64 using a filter of datetime objects.

Fixes #39

@codecov-commenter

Copy link
Copy Markdown

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.

subset should really be keyword arguments for both the inputs and limits

2 participants