def replace_none_shape(shape):
  """Replaces None with -1 in shape
  :param shape: array with initial shape components
  :returns: array with new shape
  """
  return [-1 if x is None else x for x in shape]