def __array__(self, dtype=None):
left = self.left<EOL>right = self.right<EOL>mask = self.isna()<EOL>closed = self._closed<EOL>result = np.empty(len(left), dtype=object)<EOL>for i in range(len(left)):<EOL><INDENT>if mask[i]:<EOL><INDENT>result[i] = np.nan<EOL><DEDENT>else:<EOL><INDENT>result[i] = Interval(left[i], right[i], closed)<EOL><DEDENT><DEDENT>return result<EOL>
Return the IntervalArray's data as a numpy array of Interval
objects (with dtype='object')