Skip to content

Commit

Permalink
Changed numba test.
Browse files Browse the repository at this point in the history
Return the sum of the discrimants and check number
  • Loading branch information
tomuben committed Jan 7, 2025
1 parent 0ca39d2 commit d0d7ad5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test_container/tests/test/python3-cuda-flavor/numba.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

from exasol_python_test_framework import udf
import math


class NumbaTest(udf.TestCase):
Expand All @@ -11,7 +12,7 @@ def test_numba(self):
self.query(udf.fixindent('''
CREATE OR REPLACE PYTHON3 SCALAR SCRIPT
test_numba(epochs INTEGER)
RETURNS VARCHAR(10000) AS
RETURNS DOUBLE AS
import math
from numba import vectorize, cuda
Expand All @@ -36,11 +37,12 @@ def run(ctx):
D = cu_discriminant(A, B, C)
return str(D)
return float(np.sum(D))
/
'''))

row = self.query("SELECT numbabasic.test_numba(10000);")[0]
self.assertTrue(row[0] > 0.0)


if __name__ == '__main__':
Expand Down

0 comments on commit d0d7ad5

Please sign in to comment.