Dtype / checking standardization
See original GitHub issueIn 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
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:12 (11 by maintainers)
Top Results From Across the Web
How to Standardize Data in Python (With Examples) - Statology
To standardize a dataset means to scale all of the values in the dataset such that the mean value is 0 and the...
Read more >Is there an efficient method of checking whether a column has ...
Is there a standardized method to swap two variables in Python? ... How to determine whether a column/variable is numeric or not in...
Read more >Adding Rows to a BDS Dataset: When to Use DTYPE in ...
Another way to check whether DTYPE is being used correctly is to summarize the unique values of. DTYPE without regard to parameter. Most...
Read more >sklearn.preprocessing.StandardScaler
Standardize features by removing the mean and scaling to unit variance. The standard score of a sample x is calculated as: z =...
Read more >Preprocessing - Putting it all together | Chan`s Jupyter
Categorical variables and standardization ... Checking column types. Take a look at the UFO dataset's column types using the dtypes ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW
numbers
objects areABC
’s so we can just callregister
on each subclass to addfloat32
andfloat64
if subclassing is not an optionAll the discussion is happening in gh-425 and this is basically a duplicate issue, so I’ll close this again. And we’ll try to finalize gh-425 very soon.