If a single value is provided, it is assigned at all the indices.
If a list is given, it must have the same length as indices.
ifnot isinstance(values, list):
return _assignment_single_value_by_sum(x, values, indices, axis)if not isinstance(indices, list):
After Change
if_is_boolean(indices):
indices = [index for index, val in enumerate(indices)if val]
iftf.rank(values)== 0:
return _assignment_single_value_by_sum(x, values, indices, axis)
single_index = not isinstance(indices, list)if tf.is_tensor(indices):