docs: def gifti_to_array(gii):
      '''
      gifti_to_array(gii) yields the squeezed array of data contained in the given gifti object, gii,
        Note that if gii does not contain simple data in its darray object, then this will produce
        undefined results. This operation is effectively equivalent to:
        np.squeeze([x.data for x in gii.darrays]).
      gifti_to_array(gii_filename) is equivalent to gifti_to_array(neyropythy.load(gii_filename)).
      '''
      if pimms.is_str(gii): return gifti_to_array(ny.load(gii, 'gifti'))
      elif pimms.is_nparray(gii): return gii #already done
      elif isinstance(gii, nib.gifti.gifti.GiftiImage):
          return np.squeeze(np.asarray([x.data for x in gii.darrays]))
      else: raise ValueError('Could not understand argument to gifti_to_array')