docstr: Initialize PARREC array proxy
  
  Parameters
  ----------
  file_like : file-like object
      Filename or object implementing ``read, seek, tell``
  header : PARRECHeader instance
      Implementing ``get_data_shape, get_data_dtype``,
      ``get_sorted_slice_indices``, ``get_data_scaling``,
      ``get_rec_shape``.
  mmap : {True, False, 'c', 'r'}, optional, keyword only
      `mmap` controls the use of numpy memory mapping for reading data.
      If False, do not try numpy ``memmap`` for data array.  If one of
      {'c', 'r'}, try numpy memmap with ``mode=mmap``.  A `mmap` value of
      True gives the same behavior as ``mmap='c'``.  If `file_like`
      cannot be memory-mapped, ignore `mmap` value and read array from
      file.
  scaling : {'fp', 'dv'}, optional, keyword only
      Type of scaling to use - see header ``get_data_scaling`` method.
docstr_tok: ["Initialize","PARREC","array","proxy","Parameters","--","--","--","--","--","file_like",":","file-like","object","Filename","or","object","implementing","``","read",",","seek",",","tell","``","header",":","PARRECHeader","instance","Implementing","``","get_data_shape",",","get_data_dtype","``",",","``","get_sorted_slice_indices","``",",","``","get_data_scaling","``",",","``","get_rec_shape","``",".","mmap",":","{","True",",","False",",","'","c","'",",","'","r","'","}",",","optional",",","keyword","only","`","mmap","`","controls","the","use","of","numpy","memory","mapping","for","reading","data",".","If","False",",","do","not","try","numpy","``","memmap","``","for","data","array",".","If","one","of","{","'","c","'",",","'","r","'","}",",","try","numpy","memmap","with","``","mode=mmap","``",".","A","`","mmap","`","value","of","True","gives","the","same","behavior","as","``","mmap=","'","c","'","``",".","If","`","file_like","`","can","not","be","memory-mapped",",","ignore","`","mmap","`","value","and","read","array","from","file",".","scaling",":","{","'fp","'",",","'dv","'","}",",","optional",",","keyword","only","Type","of","scaling","to","use","-","see","header","``","get_data_scaling","``","method","."]
code: def __init__(self, file_like, header, *, mmap=True, scaling="dv"):
      """Initialize PARREC array proxy
  
      Parameters
      ----------
      file_like : file-like object
          Filename or object implementing ``read, seek, tell``
      header : PARRECHeader instance
          Implementing ``get_data_shape, get_data_dtype``,
          ``get_sorted_slice_indices``, ``get_data_scaling``,
          ``get_rec_shape``.
      mmap : {True, False, 'c', 'r'}, optional, keyword only
          `mmap` controls the use of numpy memory mapping for reading data.
          If False, do not try numpy ``memmap`` for data array.  If one of
          {'c', 'r'}, try numpy memmap with ``mode=mmap``.  A `mmap` value of
          True gives the same behavior as ``mmap='c'``.  If `file_like`
          cannot be memory-mapped, ignore `mmap` value and read array from
          file.
      scaling : {'fp', 'dv'}, optional, keyword only
          Type of scaling to use - see header ``get_data_scaling`` method.
      """
      if mmap not in (True, False, "c", "r"):
          raise ValueError(
              "mmap should be one of {True, False, 'c', 'r'}"
          )
      self.file_like = file_like
      # Copies of values needed to read array
      self._shape = header.get_data_shape()
      self._dtype = header.get_data_dtype()
      self._slice_indices = header.get_sorted_slice_indices()
      self._mmap = mmap
      self._slice_scaling = header.get_data_scaling(scaling)
      self._rec_shape = header.get_rec_shape()
  
imports: import re
  import warnings
  from collections import OrderedDict
  from copy import deepcopy
  from io import StringIO
  from locale import getpreferredencoding
  import numpy
  from .affines import apply_affine, dot_reduce, from_matvec
  from .eulerangles import euler2mat
  from .fileslice import fileslice, strided_scalar
  from .nifti1 import unit_codes
  from .openers import ImageOpener
  from .spatialimages import SpatialHeader, SpatialImage
  from .volumeutils import Recoder, array_from_file
label_desc: Use image node_id 1 to create a new PARRECArrayProxy object  with example: obj = PARRECArrayProxy(file_like, header)