Test if an input value is a supported ndarray index mode.
Test if an input value is a supported ndarray casting mode.