Skip to content

cholesky incorrect for complex dtype #12335

Closed

Description

@jcmgray

Describe the issue:

The cholesky decomposition seems to be wrong for complex dtypes.

Minimal Complete Verifiable Example:

import numpy as np
import dask.array as da

# Build a random Hermitian positive-definite matrix
rng = np.random.default_rng(42)
n = 6
A_np = rng.standard_normal((n, n)) + 1j * rng.standard_normal((n, n))
A_np = A_np @ A_np.conj().T + n * np.eye(n)

A = da.from_array(A_np, chunks=(3, 3))

# Lower triangular: A = L L^H
L = da.linalg.cholesky(A, lower=True).compute()
residual_lower = np.linalg.norm(L @ L.conj().T - A_np)
print(f"lower=True  residual ||LL^H - A|| = {residual_lower:.2e}")
# lower=True  residual ||LL^H - A|| = 1.73e+01

# Upper triangular: A = U^H U
U = da.linalg.cholesky(A, lower=False).compute()
residual_upper = np.linalg.norm(U.conj().T @ U - A_np)
print(f"lower=False residual ||U^H U - A|| = {residual_upper:.2e}")
# lower=False residual ||U^H U - A|| = 2.48e+01

# Consistency check: L and U should be conjugate transposes of each other
print(f"consistency ||L - U^H||            = {np.linalg.norm(L - U.conj().T):.2e}")
# consistency ||L - U^H||            = 5.12e+00

Anything else we need to know?:

Environment:

  • Dask version: 2026.3.0
  • Python version: 3.14
  • Operating System: macos
  • Install method (conda, pip, source): conda

Activity

  1. added
    needs triage
    on Apr 1, 2026
  2. added a commit that references this issue on Apr 5, 2026
    b5700d1
  3. nicrie commented on May 7, 2026

    @nicrie
    Contributor

    perhaps a duplicate of #7639 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions