pydata / pydata/xarray

Variious tests fail on x86 (32-bit issues)?

Open
#10,956 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs triage
Dominant language
Python
Stars
4.2k
Forks
1.4k
Avg merge
2d 15h
Merged PRs (30d)
14

Description

What happened?
FAILED xarray/tests/test_formatting.py::TestFormatting::test_diff_datatree_repr_equals - assert "Left and right DataTree objects are not equal\n\nData at node 'node' does not match:\n    Differing dimensions:\n        (y: 2) != (x: 1, y: 2)\n    Differing data variables:\n    L   data     (y) i...
FAILED xarray/tests/test_formatting.py::test_repr_pandas_multi_index - assert "<xarray.DataArray 'x' (x: 4)> Size: 16B\n[4 values with dtype=object]\nCoordinates:\n  * x        (x) object 16B MultiIndex\n  * foo      (x) object 16B 'a' 'a' 'b' 'b'\n  * bar      (x) int64 32B 1...
FAILED xarray/tests/test_coding_times.py::test_decode_timedelta_via_units[decode_timedelta=False] - AssertionError: assert dtype('int32') == dtype('int64')
FAILED xarray/tests/test_variable.py::TestVariable::test_reduce_keepdims - AssertionError: Left and right Variable objects are not identical
FAILED xarray/tests/test_groupby.py::test_groupby_reduce_dimension_error - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[None-True] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[None-False] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[True-True] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[True-False] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[False-True] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_groupby.py::TestDataArrayGroupBy::test_groupby_reduce_keep_attrs[False-False] - AssertionError: Left and right DataArray objects are not identical
FAILED xarray/tests/test_namedarray.py::test_fake_target_chunksize[input_array0-1024-int64] - AssertionError: assert dtype('int32') == <class 'numpy.int64'>
FAILED xarray/tests/test_namedarray.py::test_fake_target_chunksize_cftime - assert 146 == 73
FAILED xarray/tests/test_dataset.py::TestDataset::test_to_and_from_dataframe - assert False
FAILED xarray/tests/test_strategies.py::TestReduction::test_mean - AssertionError: 
========================================================= 15 failed, 12970 passed, 6493 skipped, 26 xfailed, 9 xpassed, 12 warnings in 178.95s (0:02:58) ==========================================================
 * ERROR: dev-python/xarray-2025.11.0::gentoo failed (test phase):
 *   pytest failed with python3.13

Seems to be bad hardcoded assumptions? Tests all pass on amd64.

Verbose log: xarray-2025.11.0:20251128-074341.log

Steps to reproduce

In an x86 Gentoo container:

emerge --onlydeps --with-test-deps dev-python/xarray
FEATURES=test emerge dev-python/xarray
MVCE confirmation
  • Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
  • Complete example — the example is self-contained, including all data and the text of any traceback.
  • Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
  • New issue — a search of GitHub Issues suggests this is not a duplicate.
  • Recent environment — the issue occurs with the latest version of xarray and its dependencies.
Environment
>>> import xarray as xr >>> xr.show_versions()

INSTALLED VERSIONS

commit: None
python: 3.13.5 (main, Nov 28 2025, 05:01:36) [GCC 14.3.1 20250801]
python-bits: 32
OS: Linux
OS-release: 6.17.3-gentoo-dist
machine: i686
processor: AMD EPYC 7543 32-Core Processor
byteorder: little
LC_ALL: None
LANG: C.UTF-8
LOCALE: ('C', 'UTF-8')
libhdf5: 1.14.6
libnetcdf: None

xarray: 2025.11.0
pandas: 2.3.1
numpy: 2.3.2
scipy: 1.16.2
netCDF4: None
pydap: None
h5netcdf: None
h5py: 3.15.1
zarr: None
cftime: 1.6.5
nc_time_axis: None
iris: None
bottleneck: 1.6.0
dask: None
distributed: None
matplotlib: 3.10.3
cartopy: None
seaborn: None
numbagg: None
fsspec: None
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: 80.9.0
pip: 25.3
conda: None
pytest: 8.4.2
mypy: None
IPython: None
sphinx: None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failures in the x86 Gentoo container and inspect the verbose log first. Compare the failing tests in test_formatting.py, test_coding_times.py, test_variable.py, test_groupby.py, test_namedarray.py, test_dataset.py, and test_strategies.py with their expected dtype, size, and representation assumptions. Done means the test suite passes on 32-bit Python while retaining the existing amd64 behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, pandas, python
Domain
operating-systems, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.