@classmethod<EOL><INDENT>def find(cls, dtype):<DEDENT>
try:<EOL><INDENT>return cls._member_map_[dtype]<EOL><DEDENT>except KeyError:<EOL><INDENT>try:<EOL><INDENT>dtype = numpy.dtype(dtype).type<EOL><DEDENT>except TypeError:<EOL><INDENT>for ndstype in cls._member_map_.values():<EOL><INDENT>if ndstype.value is dtype:<EOL><INDENT>return ndstype<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>for ndstype in cls._member_map_.values():<EOL><INDENT>if ndstype.value and ndstype.numpy_dtype is dtype:<EOL><INDENT>return ndstype<EOL><DEDENT><DEDENT><DEDENT>raise ValueError('<STR_LIT>' % (dtype, cls.__name__))<EOL><DEDENT>
Returns the NDS2 type corresponding to the given python type