Skip to content

asarray() copy flag and buffer protocol inputs are not sufficiently tested #241

Open
@asmeurer

Description

@asmeurer

The asarray test seems to only test the copy flag for array inputs. But it should also work for Python built-in (scalar or sequence) and buffer protocol inputs. copy=False should always error for Python built-ins, and it should always work for buffer protocol.

Actually, buffer protocol inputs for asarray don't seem to be tested either. A simple way to test this would be to use array objects from the Python standard library array module (as confusing as that is). Or we could use the new Python buffer types, but those are Python 3.12-only.

See also data-apis/array-api-strict#15

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions