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

Categorisation functions should make lazy coordinates #5729

Open
pp-mo opened this issue Feb 1, 2024 · 1 comment
Open

Categorisation functions should make lazy coordinates #5729

pp-mo opened this issue Feb 1, 2024 · 1 comment

Comments

@pp-mo
Copy link
Member

pp-mo commented Feb 1, 2024

It looks like functions such as such as iris.coord_categorisation.add_month don't create lazy coords.
Worse, they may actually realise the existing coords which they reference ?

@acchamber
Copy link
Contributor

acchamber commented Feb 2, 2024

I Think it does. All the builtins use the _pt_date function, which requires calling the cftime.num2date function on every time point in the coord. each operation is indervidually a few milliseconds, vectorized with numpy, but you can't avoid getting the points realised before using num2date

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

2 participants