#NEWLINE# def map_arrayscalar_type( val ) : #NEWLINE# #INDENT# if isinstance ( dtype , numpy . generic ) : #NEWLINE# #INDENT# dtype = val . dtype #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# dtype = numpy . dtype ( type ( val ) ) #NEWLINE# #UNINDENT# except TypeError : #NEWLINE# #INDENT# raise NotImplementedError ( ( 'no corresponding numpy dtype for %r' % type ( val ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# return from_dtype ( dtype )