Skip to content

iinfo and finfo do not accept Arrays as input #116

Closed
@mdhaber

Description

@mdhaber

According to the standard, iinfo and finfo are supposed to accept an array (not just a type) for the first argument, but:

import array_api_strict as xp
xp.finfo(xp.asarray([1.]))  # ValueError: data type <class 'numpy.object_'> not inexact
xp.iinfo(xp.asarray([1]))  # ValueError: Invalid integer data type 'O'.
xp.__version__  # 2.2

Crossref numpy/numpy#22977, specifically argument against this type of overloading numpy/numpy#22977 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions