Skip to content

Commit

Permalink
test: no need to round
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Jan 28, 2025
1 parent 9a89674 commit 5b6477b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ibis/backends/duckdb/tests/test_udf.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ def test_builtin_fixed_length_array_udf(array_cosine_t, column, expr_fn):
@udf.scalar.builtin
def array_cosine_similarity(a, b) -> float: ...

expr = array_cosine_similarity(
expr_fn(array_cosine_t[column]), expr_fn(array_cosine_t[column])
)
expr = expr_fn(array_cosine_t[column])
expr = array_cosine_similarity(expr, expr)
result = expr.execute()
assert round(result.iat[0], 3) == 1.0
assert result.iat[0] == 1.0

0 comments on commit 5b6477b

Please sign in to comment.