class_docstr: Ecat implementation of array proxy protocol
  
  The array proxy allows us to freeze the passed fileobj and
  header such that it returns the expected data array.
class_docstr_tok: ["Ecat","implementation","of","array","proxy","protocol","The","array","proxy","allows","us","to","freeze","the","passed","fileobj","and","header","such","that","it","returns","the","expected","data","array","."]
docstr: Read of data from file
  
  This reads ALL FRAMES into one array, can be memory expensive.
  
  If you want to read only some slices, use the slicing syntax
  (``__getitem__``) below, or ``subheader.data_from_fileobj(frame)``
  
  Parameters
  ----------
  dtype : numpy dtype specifier, optional
      A numpy dtype specifier specifying the type of the returned array.
  
  Returns
  -------
  array
      Scaled image data with type `dtype`.
docstr_tok: ["Read","of","data","from","file","This","reads","ALL","FRAMES","into","one","array",",","can","be","memory","expensive",".","If","you","want","to","read","only","some","slices",",","use","the","slicing","syntax","(","``","__getitem__","``",")","below",",","or","``","subheader.data_from_fileobj","(","frame",")","``","Parameters","--","--","--","--","--","dtype",":","numpy","dtype","specifier",",","optional","A","numpy","dtype","specifier","specifying","the","type","of","the","returned","array",".","Returns","--","--","--","-","array","Scaled","image","data","with","type","`","dtype","`","."]
code: def __array__(self, dtype=None):
      """Read of data from file
  
      This reads ALL FRAMES into one array, can be memory expensive.
  
      If you want to read only some slices, use the slicing syntax
      (``__getitem__``) below, or ``subheader.data_from_fileobj(frame)``
  
      Parameters
      ----------
      dtype : numpy dtype specifier, optional
          A numpy dtype specifier specifying the type of the returned array.
  
      Returns
      -------
      array
          Scaled image data with type `dtype`.
      """
      # dtype=None is interpreted as float64
      data = np.empty(self.shape)
      frame_mapping = get_frame_order(self._subheader._mlist)
      for i in sorted(frame_mapping):
          data[:, :, :, i] = self._subheader.data_from_fileobj(
              frame_mapping[i][0]
          )
      if dtype is not None:
          data = data.astype(dtype, copy=False)
      return data
  
imports: import warnings
  from numbers import Integral
  import numpy
  from .arraywriters import make_array_writer
  from .fileslice import canonical_slicers, predict_shape, slice2outax
  from .spatialimages import SpatialHeader, SpatialImage
  from .volumeutils import array_from_file, make_dt_codes, native_code, swapped_code
  from .wrapstruct import WrapStruct
label_desc: Use image node_id 5 for calling the EcatImageArrayProxy obj's underlying member method code with example usage: obj.__array__(dtype) and returns: data