def asarray(self, copy=True, cache=False, **kwargs):
data = self._data<EOL>if data is None:<EOL><INDENT>data = self._read_data(self._fh, **kwargs)<EOL>if cache:<EOL><INDENT>self._data = data<EOL><DEDENT>else:<EOL><INDENT>return data<EOL><DEDENT><DEDENT>return deepcopy(data) if copy else data<EOL>
Return image data from file as numpy array.