Skip to content

Commit

Permalink
reformatted,
Browse files Browse the repository at this point in the history
  • Loading branch information
r0g0bum committed Jul 5, 2024
1 parent cb9b12d commit 7dd49ea
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pymilvus/orm/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,12 @@ def infer_dtype_bydata(data: Any, **kwargs):
d_type = dtype_str_map.get(type_str, DataType.UNKNOWN)
if is_varchar_datatype(d_type) or is_bool_datatype(d_type):
return DataType.ARRAY
if kwargs is None or len(kwargs) == 0 or (kwargs["type"] is not None and kwargs["type"] == "vector"):
return (
DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN
)
if (
kwargs is None
or len(kwargs) == 0
or (kwargs["type"] is not None and kwargs["type"] == "vector")
):
return DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN
else:
return DataType.ARRAY

Expand Down

0 comments on commit 7dd49ea

Please sign in to comment.