Skip to content

Commit

Permalink
fix: pyo3 ut (#4894)
Browse files Browse the repository at this point in the history
  • Loading branch information
v0y4g3r authored Oct 29, 2024
1 parent eab9e3a commit 0ee455a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -722,14 +722,14 @@ 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
except ImportError as e:
# 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)
Expand Down

0 comments on commit 0ee455a

Please sign in to comment.