def _unmap(data, count, inds, fill=0):
 if (len(data.shape) == 1):
  ret = np.empty((count,), dtype=np.float32)
  ret.fill(fill)
  ret[inds] = data
 else:
  ret = np.empty(((count,) + data.shape[1:]), dtype=np.float32)
  ret.fill(fill)
  ret[inds, :] = data
 return ret

def _unmap ( data , count , inds , fill = 0 ) : if ( len ( data . shape ) == 1 ) : ret = np . empty ( ( count , ) , dtype = np . float32 ) ret . fill ( fill ) ret [ inds ] = data else : ret = np . empty ( ( ( count , ) + data . shape [ 1 : ] ) , dtype = np . float32 ) ret . fill ( fill ) ret [ inds , : ] = data return ret
unmap a subset of item back to the original set of items .