Skip to content

Cannot compute mean if unit is None #3873

Description

@nvaytet

Example:

a = sc.array(dims=['x'], values=[1, 2, 3, 4, 5], unit=None)
a.mean()

raises UnitError: Cannot multiply with operand of unit 'None'..

I expected to get sc.scalar(3., unit=None).

Activity

  1. added theissue type on Apr 9, 2026
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

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions