Registry Mirror
Skip to content

Conversation

@jsignell

Copy link
Copy Markdown
Member

Just tries to add a suggestion about which library to install. @keewis had done something similar for guess_chunkmanager already.

For instance, if you have cubed but not cubed-xarray:

import cubed
import cubed.random

import xarray as xr

t_length = 50
spec = cubed.Spec(allowed_mem="2GB")

u = cubed.random.random((t_length, 1, 987, 1920), chunks=(10, 1, -1, -1), spec=spec)
v = cubed.random.random((t_length, 1, 987, 1920), chunks=(10, 1, -1, -1), spec=spec)

ds = xr.Dataset(
    dict(
        anom_u=(["time", "face", "j", "i"], u),
        anom_v=(["time", "face", "j", "i"], v),
    )
)
result = ds**2
result.compute()

@github-actions github-actions Bot added the topic-NamedArray Lightweight version of Variable label Dec 23, 2025
@jsignell jsignell added the topic-chunked-arrays Managing different chunked backends, e.g. dask label Dec 23, 2025
@jsignell
jsignell requested a review from keewis January 21, 2026 17:34

@keewis keewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

looks good to me. I have one stylistic comment, and as mentioned during our chat today we need tests that triggers both suggestions.

For the unknown type we probably need a dummy (something that pretends to implement the relevant protocols, no need to be thorough), and for the known array type it should be fine to only run the test if dask is not installed.

Comment thread xarray/namedarray/parallelcompat.py Resolved
jsignell and others added 3 commits January 29, 2026 10:09
@jsignell
jsignell requested a review from keewis January 29, 2026 15:49
@keewis

keewis commented Jan 29, 2026

Copy link
Copy Markdown
Collaborator

thanks!

@keewis
keewis merged commit 7a63b5a into pydata:main Jan 29, 2026
@jsignell
jsignell deleted the chunk-manager-error branch January 29, 2026 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

topic-chunked-arrays Managing different chunked backends, e.g. dask topic-NamedArray Lightweight version of Variable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants