Skip to content

conjugate not supported on Dask arrays #10302

Closed
@joneuhauser

Description

@joneuhauser

What happened?

File ".venv/lib/python3.12/site-packages/xarray/core/duck_array_ops.py", line 110, in fail_on_dask_array_input
    raise NotImplementedError(msg % func_name)
NotImplementedError: 'conjugate' is not yet a valid method on dask arrays

What did you expect to happen?

.conjugate() should work on Dask arrays.

Minimal Complete Verifiable Example

import numpy as np
import dask.array as da
import xarray as xr

real = da.random.random((100, 100))
imag = da.random.random((100, 100))
z = real + 1j * imag

data = xr.DataArray(z, coords={'x': np.arange(100), 'y': np.arange(100)})

conj_data = data.conjugate()

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.

Relevant log output

Anything else we need to know?

No response

Environment

INSTALLED VERSIONS

commit: None
python: 3.12.3 (main, Feb 4 2025, 14:48:35) [GCC 13.3.0]
python-bits: 64
OS: Linux
OS-release: 6.11.0-24-generic
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: de_DE.UTF-8
LOCALE: ('de_DE', 'UTF-8')
libhdf5: 1.14.6
libnetcdf: None

xarray: 2025.3.1
pandas: 2.2.3
numpy: 2.2.5
scipy: 1.15.2
netCDF4: None
pydap: None
h5netcdf: None
h5py: 3.13.0
zarr: 3.0.7
cftime: None
nc_time_axis: None
iris: None
bottleneck: None
dask: 2025.4.0
distributed: 2025.4.0
matplotlib: 3.10.1
cartopy: None
seaborn: None
numbagg: None
fsspec: 2025.3.2
cupy: None
pint: None
sparse: None
flox: None
numpy_groupies: None
setuptools: None
pip: 24.0
conda: None
pytest: None
mypy: None
IPython: 9.1.0
sphinx: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions