Skip to content

Test failures with xarray<=2025.4.0 and zarr v3 (Float64 dtype error) #259

Description

@ashum9

Problem

Running the neural-lam test suite on a fresh environment with recent
dependency versions (e.g. xarray 2025.4.0 and zarr 3.1.5) results in
multiple datastore-related test failures:

AttributeError: 'Float64' object has no attribute 'value'

The error occurs during xr.open_zarr() calls when loading the example
datastores.

Cause

The issue originates in xarray's zarr backend where xarray assumes that
zarr dtype objects expose a .value attribute. This assumption does not
hold for zarr v3 dtype objects such as Float64.

The neural-lam codebase does not use .value; the error occurs entirely
inside xarray.

Workaround

Upgrading xarray resolves the issue:

xarray >= 2026.2.0

With this version the full test suite passes:

110 passed, 0 failed

Notes

The test datasets appear to use zarr v3 format, so zarr v3 support is
required.

I opened a PR proposing a minimal dependency constraint:

xarray>=2026.2.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions