Skip to content

__class__ assignment fails with mixin_class decorator #2533

@agoose77

Description

@agoose77

Version of Awkward Array

main

Description and code to reproduce

Setting __class__ to a class built by ak.mixin_class is failing for numpy>=1.25.0.

import awkward as ak

behavior = {}


class Point:
    ...


class MyPoint(Point, ak.Array):
    ...


behavior["*", "Point"] = MyPoint  # type("MyPoint", (Point, ak.Array), {})

ak.operations.zip(
    {
        "x": ak.Array([1, 1]),
        "y": ak.Array([1, 1]),
    },
    with_name="Point",
    behavior=behavior,
)

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