#NEWLINE# def from_dtype( dtype ) : #NEWLINE# #INDENT# '\n    Return a Numba Type instance corresponding to the given Numpy *dtype*.\n    NotImplementedError is raised on unsupported Numpy dtypes.\n    ' #NEWLINE# if ( dtype . fields is None ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# return FROM_DTYPE [ dtype ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# if ( subtype . char in 'SU' ) : #NEWLINE# #INDENT# return _from_str_dtype ( dtype ) #NEWLINE# #UNINDENT# if ( dtype . char in 'mM' ) : #NEWLINE# #INDENT# return _from_datetime_dtype ( dtype ) #NEWLINE# #UNINDENT# if ( dtype . char in 'V' ) : #NEWLINE# #INDENT# subtype = from_dtype ( dtype . subdtype [ 0 ] ) #NEWLINE# return types . NestedArray ( subtype , dtype . shape ) #NEWLINE# #UNINDENT# raise NotImplementedError ( dtype ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# return from_struct_dtype ( dtype )