Skip to content

torch.zeros can not pass shape as keyword argument #22

Closed
@thomasjpfan

Description

@thomasjpfan
import array_api_compat
import torch

x = torch.asarray([1.0, 2.0, 3.0])
xp = array_api_compat.get_namespace(x)
xp.zeros(shape=(8, 4))
# TypeError: zeros() missing 1 required positional arguments: "size"

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