Skip to content

Commit cb9b12d

Browse files
author
r0g0bum
committed
reformatted
Signed-off-by: r0g0bum <[email protected]>
1 parent d0f3753 commit cb9b12d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pymilvus/orm/types.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ def infer_dtype_bydata(data: Any, **kwargs):
131131
d_type = dtype_str_map.get(type_str, DataType.UNKNOWN)
132132
if is_varchar_datatype(d_type) or is_bool_datatype(d_type):
133133
return DataType.ARRAY
134-
if kwargs is None or len(kwargs) == 0:
135-
return DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN
136-
elif kwargs["type"] is not None and kwargs["type"] == "vector":
134+
if kwargs is None or len(kwargs) == 0 or (kwargs["type"] is not None and kwargs["type"] == "vector"):
137135
return (
138136
DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN
139137
)

0 commit comments

Comments
 (0)