def __array_prepare__(self, result, context=None):
<EOL>if (context is not None and<EOL>(not isinstance(self._values, (np.ndarray, ExtensionArray))<EOL>or isinstance(self._values, Categorical))):<EOL><INDENT>obj = context[<NUM_LIT:1>][<NUM_LIT:0>]<EOL>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>".format(<EOL>obj=type(obj).__name__,<EOL>dtype=getattr(obj, '<STR_LIT>', None),<EOL>op=context[<NUM_LIT:0>].__name__))<EOL><DEDENT>return result<EOL>
Gets called prior to a ufunc.