feat: adding management of numpy.absolute

refs #126
This commit is contained in:
Benoit Chevallier-Mames
2021-09-29 11:44:04 +02:00
committed by Benoit Chevallier
parent 0a758ed672
commit 2351730cee
2 changed files with 7 additions and 2 deletions

View File

@@ -191,7 +191,7 @@ class NPTracer(BaseTracer):
LIST_OF_SUPPORTED_UFUNC: List[numpy.ufunc] = [
# The commented functions are functions which don't work for the moment, often
# if not always because they require more than a single argument
# numpy.absolute,
numpy.absolute,
# numpy.add,
numpy.arccos,
numpy.arccosh,

View File

@@ -368,7 +368,12 @@ def test_trace_numpy_supported_ufuncs(inputs, expected_output_node):
if function_to_trace_def in LIST_OF_UFUNC_WHOSE_OUTPUT_IS_FLOAT64:
assert op_graph.output_nodes[0].outputs[0] == EncryptedScalar(Float(64))
else:
assert op_graph.output_nodes[0].outputs[0] == "to be done"
assert op_graph.output_nodes[0].outputs[0] in [
EncryptedScalar(Integer(32, is_signed=False)),
EncryptedScalar(Integer(32, is_signed=True)),
EncryptedScalar(Integer(64, is_signed=True)),
EncryptedScalar(Float(64)),
]
def test_trace_numpy_ufuncs_not_supported():