From 7cd45fb598c638d7e89b05f582ec3cfc290efea2 Mon Sep 17 00:00:00 2001 From: r0g0bum Date: Fri, 5 Jul 2024 08:47:51 +0530 Subject: [PATCH] reformatted --- pymilvus/orm/types.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pymilvus/orm/types.py b/pymilvus/orm/types.py index 746dde065..3f8706ff6 100644 --- a/pymilvus/orm/types.py +++ b/pymilvus/orm/types.py @@ -133,13 +133,12 @@ def infer_dtype_bydata(data: Any, **kwargs): 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": + return ( + DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN + ) else: - if 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 + return DataType.ARRAY if d_type == DataType.UNKNOWN: try: