Skip to content

squeeze accepts axis=None? #62

Open
@mdhaber

Description

It looks like axis=None is not in the standard for squeeze, yet it is accepted by array_api_strict.

import array_api_strict as xp
x = xp.reshape(xp.arange(12), (3, 4))[..., xp.newaxis]
xp.squeeze(x, axis=None)
# Array([[ 0,  1,  2,  3],
#        [ 4,  5,  6,  7],
#        [ 8,  9, 10, 11]], dtype=array_api_strict.int64)

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