Skip to content

Support NumPy 2.3 #3530

@lgray

Description

@lgray

Version of Awkward Array

latest in pypi

Description and code to reproduce

Found in: https://github.com/scikit-hep/fastjet/actions/runs/15510572224/job/43671004688

    def shape_item_as_index(self, x1: ShapeItem) -> int:
        if x1 is unknown_length:
            raise TypeError("array module nplikes do not support unknown lengths")
        elif isinstance(x1, int):
            return x1
        else:
>           raise TypeError(f"expected None or int type, received {x1}")
E           TypeError: expected None or int type, received 2

/opt/hostedtoolcache/Python/3.13.3/x64/lib/python3.13/site-packages/awkward/_nplikes/array_module.py:383: TypeError

This test functions with numpy < 2.3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe problem described is something that must be fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions