code: def from_numpy(cls, 
        arr, vol_path='file:///tmp/image/'+generate_random_string(),
        resolution=(4,4,40), voxel_offset=(0,0,0), 
        chunk_size=(128,128,64), layer_type=None, max_mip=0,
        encoding='raw', compress=None
      ):
      
      if not layer_type:
        if arr.dtype in (np.bool, np.uint32, np.uint64, np.uint16):
          layer_type = 'segmentation'
        elif np.issubdtype(arr.dtype, np.integer) \
                          or np.issubdtype(arr.dtype, np.floating):
          layer_type = 'image'
        else:
          raise NotImplementedError
  
      if arr.ndim == 3:
        num_channels = 1
      elif arr.ndim == 4:
        num_channels = arr.shape[-1]
      else:
        raise NotImplementedError
  
      info = cls.create_new_info(num_channels, layer_type, arr.dtype.name, encoding, resolution, 
                                 voxel_offset, arr.shape[:3], chunk_size=chunk_size, max_mip=max_mip)
      vol = CloudVolume(vol_path, info=info, bounded=True, compress=compress) 
      # save the info file
      vol.commit_info()
      vol.provenance.processing.append({
        'method': 'from_numpy',
        'date': strftime('%Y-%m-%d %H:%M %Z')
      })
      vol.commit_provenance()
      # save the numpy array
      vol[:,:,:] = arr
      return vol
docs: max_mip: (int) the maximum mip level id in the info file. 
      Note that currently the numpy array can only sit in mip 0,
      the max_mip was only created in info file.
      the numpy array itself was not downsampled.