Skip to content

da.quantile with weights fails #12322

Description

@joshua-gould

Passing weights to dask array quantile fails with the error:
ValueError('Shape of weights must be consistent with shape of a along specified axis.')

Minimal Complete Verifiable Example:

import dask.array as da
import numpy as np

x = np.random.random((10, 4))
weights = np.ones(10)
np.quantile(x, weights=weights, q=0.5, axis=0, method="inverted_cdf")
da.quantile(da.from_array(x), weights=weights, q=0.5, axis=0, method="inverted_cdf")

Environment:

  • Dask version: dask==2026.1.2

Activity

  1. added
    needs triage
    on Mar 11, 2026
  2. added
    bug
    and removed
    needs triage
    on Mar 11, 2026
  3. melonora commented on Mar 12, 2026

    @melonora
    Contributor

    I will have a look. @jacobtomlinson you can assign me

  4. added a commit that references this issue on Apr 5, 2026
    e8c924c
  5. added a commit that references this issue on Apr 10, 2026
    3070c9b
  6. crusaderky commented on May 12, 2026

    @crusaderky
    Collaborator

    Could use review for #12380

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions