From 12a14d8de24d0c963fe9d796d5536a9432152b62 Mon Sep 17 00:00:00 2001 From: r0g0bum Date: Fri, 5 Jul 2024 09:05:33 +0530 Subject: [PATCH] reformatted --- pymilvus/orm/types.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pymilvus/orm/types.py b/pymilvus/orm/types.py index 3f8706ff6..438e24767 100644 --- a/pymilvus/orm/types.py +++ b/pymilvus/orm/types.py @@ -131,9 +131,7 @@ 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: - return DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN - elif kwargs["type"] is not None and kwargs["type"] == "vector": + 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 )