Skip to content

bool ** bool gives incorrect results #5356

Closed

Description

@1RyanK

Describe the bug
In iPython, numpy does

In [1]: import numpy as np

In [2]: a = np.array([True, True, False, False])

In [3]: b = np.array([True, False, True, False])

In [4]: a ** b
Out[4]: array([1, 1, 0, 1], dtype=int8)

But we do

In [1]: a = ak.array([True, True, False, False])

In [2]: b = ak.array([True, False, True, False])

In [3]: a ** b
Out[3]: array([0 0 1 0])

The values are wrong.

Activity

  1. self-assigned this
    on Jan 28, 2026
  2. added
    bug
    on Jan 28, 2026
  3. added a commit that references this issue on Jan 28, 2026
    fb27123
  4. added a commit that references this issue on Jan 28, 2026
    ffd1619
  5. 1RyanK commented on Feb 3, 2026

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

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions