Skip to content

finfo/iinfo accepts strings? #138

Closed
@mdhaber

Description

@mdhaber

According to the standard, the only acceptable types for the argument of finfo are dtype and array. However, finfo and iinfo currently accept strings.

import array_api_strict as xp
xp.finfo('float32')
# finfo_object(bits=32, eps=1.1920928955078125e-07, max=3.4028234663852886e+38, min=-3.4028234663852886e+38, smallest_normal=1.1754943508222875e-38, dtype=dtype('float32'))
# iinfo_object(bits=32, max=2147483647, min=-2147483648, dtype=dtype('int32'))

I'm not sure what the definition of the dtype type is, so this might be OK, but I'm guessing it's more flexible than intended.

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