refactored dtype.h to more python friendly format