Closed
Description
In the current specification, there are not standardized data type objects, or a specification as to what a data type object needs to implement: https://data-apis.org/array-api/latest/API_specification/data_types.html
Additionally, there's no APIs in the specification for checking dtypes, i.e. something like np.issubdtype
that is somewhat commonly used in code that would look something like:
def dispatch_based_on_dtype(array):
if np.issubdtype(array.dtype, np.integer):
return ...
elif np.issubdtype(array.dtype, np.floating):
return ...
else:
return ...
cc @jakirkham as I believe this pattern is used quite a bit in Dask which would presumably want to be able to target arbitrary array objects under the hood
Metadata
Metadata
Assignees
Labels
No labels