Skip to content

Commit

Permalink
removed power
Browse files Browse the repository at this point in the history
  • Loading branch information
StRigaud committed Oct 18, 2024
1 parent a6985b5 commit aa6466b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 74 deletions.
28 changes: 14 additions & 14 deletions pyclesperanto/_interroperability.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,23 @@ def cbrt(x, out=None):
return cubic_root(input_image=x, output_image=out, device=x.device)


def power(x1, x2, out=None):
x1 = asarray(x1)
if out:
out = asarray(out)
# def power(x1, x2, out=None):
# x1 = asarray(x1)
# if out:
# out = asarray(out)

# test if x2 is a scalar
if np.isscalar(x2):
from ._tier1 import power
# # test if x2 is a scalar
# if np.isscalar(x2):
# from ._tier1 import power

return power(input_image=x1, scalar=x2, output_image=out, device=x1.device)
else:
from ._tier1 import power_images
# return power(input_image=x1, scalar=x2, output_image=out, device=x1.device)
# else:
# from ._tier1 import power_images

x2 = asarray(x2)
return power_images(
input_image0=x1, input_image1=x2, output_image=out, device=x1.device
)
# x2 = asarray(x2)
# return power_images(
# input_image0=x1, input_image1=x2, output_image=out, device=x1.device
# )


def fabs(x, out=None):
Expand Down
59 changes: 0 additions & 59 deletions tests/test_operability.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_power.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def test_power():
)
)

result = cle.power(test1, 3)
result = cle.power(test1, scalar=3)

print(result)

Expand Down

0 comments on commit aa6466b

Please sign in to comment.