if not isinstance(values, list):
return _assignment_single_value_by_sum(x, values, indices, axis)
if not isinstance(indices, list):
indices = [indices]
if len(values) != len(indices):
raise ValueError("Either one value or as many values as indices")
for (nb_index, index) in enumerate(indices):
After Change
if _is_boolean(indices):
indices = [index for index, val in enumerate(indices) if val]
if tf.rank(values) == 0:
return _assignment_single_value_by_sum(x, values, indices, axis)
single_index = not isinstance(indices, list)
if tf.is_tensor(indices):