code: def dump_array(array, name, path):
      """Dump array for memmapping.
  
      Parameters
      ----------
      array : array-like
          Array to be persisted
  
      name : str
          Name of file
  
      path : str
          Path to cache.
  
      Returns
      -------
      f: array-like
          memory-mapped array.
      """
      # First check if the array is on file
      if isinstance(array, str):
          # Load file from disk. Need to dump if not memmaped already
          if not array.split(".")[-1] in ["mmap", "npy", "npz"]:
              # Try loading the file assuming a csv-like format
              array = _load(array)
  
      if isinstance(array, str):
          # If arr remains a string, it's pointing to an mmap file
          f = array
      else:
          # Dump ndarray on disk
          f = os.path.join(path, "%s.mmap" % name)
          if os.path.exists(f):
              os.unlink(f)
          dump(array, f)
      return f
  
imports: from __future__ import with_statement, division
  import gc
  import os
  import shutil
  import subprocess
  import tempfile
  import warnings
  from abc import ABCMeta, abstractmethod
  import numpy
  from scipy.sparse import issparse, hstack
  from ..None import config
  from ..externals.joblib import Parallel, dump, load
  from ..utils import check_initialized
  from ..utils.exceptions import ParallelProcessingError, ParallelProcessingWarning
  from ..externals.sklearn.validation import check_random_state
label_desc: Use image node_id 2 for calling a global function with example usage: dump_array(array, name, path) and returns: f