From 69cbc333ad00d234ea6ccacd4e93c90a4950819a Mon Sep 17 00:00:00 2001 From: Abhay Date: Tue, 14 Nov 2023 23:00:39 -0600 Subject: [PATCH] Infer ARRAY datatype from list like non numeric objects Signed-off-by: Abhay Ratnaparkhi --- pymilvus/orm/types.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pymilvus/orm/types.py b/pymilvus/orm/types.py index 1bb4eb715..da3b76d79 100644 --- a/pymilvus/orm/types.py +++ b/pymilvus/orm/types.py @@ -121,7 +121,10 @@ def infer_dtype_bydata(data: Any): failed = True if not failed: d_type = dtype_str_map.get(type_str, DataType.UNKNOWN) - return DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.UNKNOWN + if d_type != DataType.UNKNOWN: + return DataType.FLOAT_VECTOR if is_numeric_datatype(d_type) else DataType.ARRAY + else: + return d_type if d_type == DataType.UNKNOWN: try: