Skip to content

ak.enforce_type goes into infinite recursion with typetracer arrays #3736

@ikrommyd

Description

@ikrommyd

Version of Awkward Array

HEAD

Description and code to reproduce

ak.enforce_type goes into infinite recursion with typetracer arrays which also has downstream effects that this gets hit in dask-awkward too naturally.

To reproduce:

import awkward as ak
array = ak.Array(ak.Array([1, 2, 3, None]).layout.to_typetracer())
ak.enforce_type(array[:-1], "int64")

hits

RecursionError: maximum recursion depth exceeded

This error occurred while calling

    ak.enforce_type(
        <Array-typetracer [...] type='4 * ?int64'>
        'int64'
    )

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug (unverified)The problem described would be a bug, but needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions