Skip to content

Commit 0979edf

Browse files
authored
[2.4] fix sparse: accpet int/float wrapped in string (#2095)
pr: #2094 Signed-off-by: Buqian Zheng <[email protected]>
1 parent c19be3c commit 0979edf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pymilvus/client/entity_helper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ def sparse_float_row_to_bytes(indices: Iterable[int], values: Iterable[float]):
107107
values = []
108108
row = row_data.items() if isinstance(row_data, dict) else row_data
109109
for index, value in row:
110-
indices.append(index)
111-
values.append(value)
110+
indices.append(int(index))
111+
values.append(float(value))
112112
result.contents.append(sparse_float_row_to_bytes(indices, values))
113113
dim = max(dim, indices[-1] + 1)
114114
result.dim = dim

0 commit comments

Comments
 (0)