Skip to content

Commit

Permalink
[2.4] fix sparse: accpet int/float wrapped in string (#2095)
Browse files Browse the repository at this point in the history
pr: #2094

Signed-off-by: Buqian Zheng <[email protected]>
  • Loading branch information
zhengbuqian authored May 15, 2024
1 parent c19be3c commit 0979edf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymilvus/client/entity_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0979edf

Please sign in to comment.