Skip to content
This repository was archived by the owner on Jun 10, 2020. It is now read-only.
This repository was archived by the owner on Jun 10, 2020. It is now read-only.

Exporting type aliases for DtypeLike, ShapeLike and ArrayLike #13

Closed
@shoyer

Description

@shoyer

These would indicate anything NumPy can coerce into the respective type:

  • DtypeLike can be coerced into/with np.dtype
  • ShapeLike can be coerced into Tuple[int, ...]
  • ArrayLike can be coerced into np.ndarray with np.array

See #10 for (currently private) aliases _DtypeLike and _ShapeLike.

It would be nice to export these publicly for the benefit of downstream users.

The main complication is that this would likely also require adding these aliases to NumPy itself. Potentially, this could be unnecessary with from __future__ import annotations in Python 3.7 (PEP 564).

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