diff --git a/pymilvus/client/entity_helper.py b/pymilvus/client/entity_helper.py index a946d52b6..21a3b40b6 100644 --- a/pymilvus/client/entity_helper.py +++ b/pymilvus/client/entity_helper.py @@ -107,8 +107,8 @@ def sparse_float_row_to_bytes(indices: Iterable[int], values: Iterable[float]): values = [] row = row_data.items() if isinstance(row_data, dict) else row_data for index, value in row: - indices.append(index) - values.append(value) + indices.append(int(index)) + values.append(float(value)) result.contents.append(sparse_float_row_to_bytes(indices, values)) dim = max(dim, indices[-1] + 1) result.dim = dim