Skip to content

Bug in transpose() for boolean data from disk? #10536

@dcherian

Description

@dcherian

Discussed in #10530

Originally posted by will-s-hart July 14, 2025
I've just noticed that something like the following:

import xarray as xr

ds = xr.Dataset({"temperature": (["x", "y"], [[False, True], [True, False]])})
ds.to_netcdf("some_path.nc")

with xr.open_dataset("some_path.nc") as ds_disk:
    ds_disk.transpose()

which worked previously, now (as of v2025.7.0) raises AttributeError: 'BoolTypeArray' object has no attribute 'transpose'.

Loading the dataset first (i.e. ds_disk.load()) fixes things, but I'm not sure if all of this is expected or is a bug?

Thanks!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions