@classmethod<EOL><INDENT>def _simple_new(cls, values, name=None, dtype=None, **kwargs):<DEDENT>
if not hasattr(values, '<STR_LIT>'):<EOL><INDENT>if (values is None or not len(values)) and dtype is not None:<EOL><INDENT>values = np.empty(<NUM_LIT:0>, dtype=dtype)<EOL><DEDENT>else:<EOL><INDENT>values = np.array(values, copy=False)<EOL>if is_object_dtype(values):<EOL><INDENT>values = cls(values, name=name, dtype=dtype,<EOL>**kwargs)._ndarray_values<EOL><DEDENT><DEDENT><DEDENT>if isinstance(values, (ABCSeries, ABCIndexClass)):<EOL><INDENT>values = np.asarray(values._values)<EOL><DEDENT>result = object.__new__(cls)<EOL>result._data = values<EOL>result._index_data = values<EOL>result.name = name<EOL>for k, v in kwargs.items():<EOL><INDENT>setattr(result, k, v)<EOL><DEDENT>return result._reset_identity()<EOL>
We require that we have a dtype compat for the values. If we are passed
a non-dtype compat, then coerce using the constructor.

Must be careful not to recurse.