- 
                Notifications
    You must be signed in to change notification settings 
- Fork 16
Open
Labels
Description
Hello! Very excited about this library, as it (hopefully) provides a place to put functions that are array agnostic and usable by many people. Let me describe two simple ones that I'd like to make a PR for.
I'd like to add functions real_type(dtype) and complex_type(dtype). These are simple:
- real_typetakes in a real or complex dtype, and returns the corresponding floating-point dtype. So- complex128 -> float64, complex64 -> float32, float64 -> float64, float32 -> float32.
- complex_typetakes in a real or complex dtype, and returns the corresponding complex floating-point dtype. So- float64 -> complex128, float32 -> complex64, complex128 -> complex128, complex64 -> complex64.
This can be really helpful in application code to work out the correct types. Shall I make a PR for these?