utility functions for numpy dtypes