def get_dims(data):
  """Given a record array, extract the dimensions of each column."""
  x, _ = data
  dims = [x[0][name].shape for name in x.dtype.names]
  return [1 if not d else d[0] for d in dims]