def _sub_datetime_arraylike(self, other):
if len(self) != len(other):<EOL><INDENT>raise ValueError("<STR_LIT>")<EOL><DEDENT>if isinstance(other, np.ndarray):<EOL><INDENT>assert is_datetime64_dtype(other)<EOL>other = type(self)(other)<EOL><DEDENT>if not self._has_same_tz(other):<EOL><INDENT>raise TypeError("<STR_LIT>"<EOL>"<STR_LIT>"<EOL>.format(cls=type(self).__name__))<EOL><DEDENT>self_i8 = self.asi8<EOL>other_i8 = other.asi8<EOL>arr_mask = self._isnan | other._isnan<EOL>new_values = checked_add_with_arr(self_i8, -other_i8,<EOL>arr_mask=arr_mask)<EOL>if self._hasnans or other._hasnans:<EOL><INDENT>new_values[arr_mask] = iNaT<EOL><DEDENT>return new_values.view('<STR_LIT>')<EOL>
subtract DatetimeArray/Index or ndarray[datetime64]