From 0ee455a9807751823bdf4664320030816fc51d5e Mon Sep 17 00:00:00 2001 From: "Lei, HUANG" <6406592+v0y4g3r@users.noreply.github.com> Date: Mon, 28 Oct 2024 21:47:57 -0700 Subject: [PATCH] fix: pyo3 ut (#4894) --- src/script/src/python/ffi_types/pair_tests/sample_testcases.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs b/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs index 3088faa4f4..1009a8ee23 100644 --- a/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs +++ b/src/script/src/python/ffi_types/pair_tests/sample_testcases.rs @@ -722,6 +722,7 @@ import math @coprocessor(args=[], returns=["value"], backend="pyo3") def test_numpy() -> vector[i64]: + from greptime import vector try: import numpy as np import pyarrow as pa @@ -729,7 +730,6 @@ def test_numpy() -> vector[i64]: # Python didn't have numpy or pyarrow print("Warning: no pyarrow or numpy found in current python", e) return vector([0, 1, 2, 3, 4, 5, 6, 7, 8, 9,]) - from greptime import vector v = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9,]) v = pa.array(v) v = vector.from_pyarrow(v)