class_docstr: An object to be persisted instead of numpy arrays.
  
  This object is used to hack into the pickle machinery and read numpy
  array data from our custom persistence format.
  More precisely, this object is used for:
  * carrying the information of the persisted array: subclass, shape, order,
  dtype. Those ndarray metadata are used to correctly reconstruct the array
  with low level numpy functions.
  * determining if memmap is allowed on the array.
  * reading the array bytes from a file.
  * reading the array using memorymap from a file.
  * writing the array bytes to a file.
  
  Attributes
  ----------
  subclass: numpy.ndarray subclass
      Determine the subclass of the wrapped array.
  shape: numpy.ndarray shape
      Determine the shape of the wrapped array.
  order: {'C', 'F'}
      Determine the order of wrapped array data. 'C' is for C order, 'F' is
      for fortran order.
  dtype: numpy.ndarray dtype
      Determine the data type of the wrapped array.
  allow_mmap: bool
      Determine if memory mapping is allowed on the wrapped array.
      Default: False.
class_docstr_tok: ["An","object","to","be","persisted","instead","of","numpy","arrays",".","This","object","is","used","to","hack","into","the","pickle","machinery","and","read","numpy","array","data","from","our","custom","persistence","format",".","More","precisely",",","this","object","is","used","for",":","*","carrying","the","information","of","the","persisted","array",":","subclass",",","shape",",","order",",","dtype",".","Those","ndarray","metadata","are","used","to","correctly","reconstruct","the","array","with","low","level","numpy","functions",".","*","determining","if","memmap","is","allowed","on","the","array",".","*","reading","the","array","bytes","from","a","file",".","*","reading","the","array","using","memorymap","from","a","file",".","*","writing","the","array","bytes","to","a","file",".","Attributes","--","--","--","--","--","subclass",":","numpy.ndarray","subclass","Determine","the","subclass","of","the","wrapped","array",".","shape",":","numpy.ndarray","shape","Determine","the","shape","of","the","wrapped","array",".","order",":","{","'","C","'",",","'","F","'","}","Determine","the","order","of","wrapped","array","data",".","'","C","'","is","for","C","order",",","'","F","'","is","for","fortran","order",".","dtype",":","numpy.ndarray","dtype","Determine","the","data","type","of","the","wrapped","array",".","allow_mmap",":","bool","Determine","if","memory","mapping","is","allowed","on","the","wrapped","array",".","Default",":","False","."]
docstr: Read array from unpickler file handle.
  
  This function is an adaptation of the numpy read_array function
  available in version 1.10.1 in numpy/lib/format.py.
docstr_tok: ["Read","array","from","unpickler","file","handle",".","This","function","is","an","adaptation","of","the","numpy","read_array","function","available","in","version","1.10.1","in","numpy\/lib\/format.py","."]
code: def read_array(self, unpickler):
      """Read array from unpickler file handle.
  
      This function is an adaptation of the numpy read_array function
      available in version 1.10.1 in numpy/lib/format.py.
      """
      if len(self.shape) == 0:
          count = 1
      else:
          count = unpickler.np.multiply.reduce(self.shape)
      # Now read the actual data.
      if self.dtype.hasobject:
          # The array contained Python objects. We need to unpickle the data.
          array = pickle.load(unpickler.file_handle)
      else:
          if not PY3_OR_LATER and unpickler.np.compat.isfileobj(
              unpickler.file_handle
          ):
              # In python 2, gzip.GzipFile is considered as a file so one
              # can use numpy.fromfile().
              # For file objects, use np.fromfile function.
              # This function is faster than the memory-intensive
              # method below.
              array = unpickler.np.fromfile(
                  unpickler.file_handle, dtype=self.dtype, count=count
              )
          else:
              # This is not a real file. We have to read it the
              # memory-intensive way.
              # crc32 module fails on reads greater than 2 ** 32 bytes,
              # breaking large reads from gzip streams. Chunk reads to
              # BUFFER_SIZE bytes to avoid issue and reduce memory overhead
              # of the read. In non-chunked case count < max_read_count, so
              # only one read is performed.
              max_read_count = BUFFER_SIZE // min(
                  BUFFER_SIZE, self.dtype.itemsize
              )
  
              array = unpickler.np.empty(count, dtype=self.dtype)
              for i in range(0, count, max_read_count):
                  read_count = min(max_read_count, count - i)
                  read_size = int(read_count * self.dtype.itemsize)
                  data = _read_bytes(
                      unpickler.file_handle, read_size, "array data"
                  )
                  array[i : i + read_count] = unpickler.np.frombuffer(
                      data, dtype=self.dtype, count=read_count
                  )
                  del data
  
          if self.order == "F":
              array.shape = self.shape[::-1]
              array = array.transpose()
          else:
              array.shape = self.shape
  
      return array
  
imports: import pickle
  import os
  import sys
  import warnings
  from .numpy_pickle_utils import _COMPRESSORS
  from .numpy_pickle_utils import BinaryZlibFile
  from .numpy_pickle_utils import Unpickler, Pickler
  from .numpy_pickle_utils import _read_fileobject, _write_fileobject
  from .numpy_pickle_utils import _read_bytes, BUFFER_SIZE
  from .numpy_pickle_compat import load_compatibility
  from .numpy_pickle_compat import NDArrayWrapper
  from .numpy_pickle_compat import ZNDArrayWrapper
  from ._compat import _basestring, PY3_OR_LATER
  from .backports import make_memmap
label_desc: Use image node_id 3 for calling the NumpyArrayWrapper obj's underlying member method code with example usage: obj.read_array(unpickler) and returns: array