Skip to content

Commit

Permalink
entity_is_sparse_matrix: each row should be dict or list
Browse files Browse the repository at this point in the history
Signed-off-by: Buqian Zheng <[email protected]>
  • Loading branch information
zhengbuqian committed Oct 23, 2024
1 parent 4f64af7 commit af80d55
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pymilvus/client/entity_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def is_float_type(v: Any):
for item in entity:
if SciPyHelper.is_scipy_sparse(item):
return item.shape[0] == 1
if not isinstance(item, dict) and not isinstance(item, list):
return False
pairs = item.items() if isinstance(item, dict) else item
# each row must be a list of Tuple[int, float]. we allow empty sparse row
for pair in pairs:
Expand Down

0 comments on commit af80d55

Please sign in to comment.