Skip to content

More strict type checking #6

Open
@asmeurer

Description

@asmeurer

In numpy.array_api, we said that type checking that inputs were Array was too much overhead, and we would just rely on the the type signatures and type checking to do this.

However, given that we are no longer thinking of this library as something that is used in production, I don't think we need to worry so much about the overhead of type checking. It might be a good idea to add explicit type checks to functions. This would prevent a sufficiently duck-typed object from silently passing through, although that's pretty unlikely since basically every function uses x._array on its input. The real reason would be to provide better error messages that AttributeError on bad inputs.

Maybe this can be done automatically from the type signatures using one of those fancy libraries I know nothing about.

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