Skip to content

vectorize forces NumPy ndarray output #10155

@jakirkham

Description

@jakirkham

Even though vectorize internally uses a ufunc, it appears that it coerces its results into arrays. Thus even if the input data implemented __array_ufunc__, the result would be a NumPy Array. This means that other types (e.g. Dask Arrays) will be computed by vectorize even if it was not the users intent.

Edit: Similar issues occur when signature is provided.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions