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.
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:
          # joblib issue #859: we cast the elements of self.shape to int64 to
          # prevent a potential overflow when computing their product.
          shape_int64 = [unpickler.np.int64(x) for x in self.shape]
          count = unpickler.np.multiply.reduce(shape_int64)
      # 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:
          numpy_array_alignment_bytes = (
              self.safe_get_numpy_array_alignment_bytes()
          )
          if numpy_array_alignment_bytes is not None:
              padding_byte = unpickler.file_handle.read(1)
              padding_length = int.from_bytes(
                  padding_byte, byteorder="little"
              )
              if padding_length != 0:
                  unpickler.file_handle.read(padding_length)
  
          # 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
  
      # Detect byte order mismatch and swap as needed.
      return _ensure_native_byte_order(array)
  
imports: import pickle
  import os
  import warnings
  import io
  from pathlib import Path
  from .compressor import lz4, LZ4_NOT_INSTALLED_ERROR
  from .compressor import _COMPRESSORS, register_compressor, BinaryZlibFile
  from .compressor import ZlibCompressorWrapper, GzipCompressorWrapper, BZ2CompressorWrapper, LZMACompressorWrapper, XZCompressorWrapper, LZ4CompressorWrapper
  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_utils import _ensure_native_byte_order
  from .numpy_pickle_compat import load_compatibility
  from .numpy_pickle_compat import NDArrayWrapper
  from .numpy_pickle_compat import ZNDArrayWrapper
  from .backports import make_memmap
label_desc: Use image node_id 4 for calling the NumpyArrayWrapper obj's underlying member method code with example usage: obj.read_array(unpickler) and returns: _ensure_native_byte_order