Skip to content

Commit 7fb807f

Browse files
committed
Merge branch 'cplx2_array_fix' of https://github.com/edwinsolisf/arrayfire-py into afwheel310
2 parents 05718d8 + 24f4fb6 commit 7fb807f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

arrayfire/library/mathematical_functions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,11 @@ def atan2(x1: int | float | Array, x2: int | float | Array, /) -> Array:
261261
return process_c_function(x1, x2, wrapper.atan2)
262262

263263

264-
@afarray_as_array
265264
def cplx(x1: int | float | Array, /, x2: int | float | Array | None = None) -> Array:
266265
if x2 is None:
267266
if not isinstance(x1, Array):
268267
raise TypeError("x1 can not be int or tuple when x2 is None.")
269-
return cast(Array, wrapper.cplx(x1.arr))
268+
return Array.from_afarray(Array, wrapper.cplx(x1.arr))
270269
else:
271270
return process_c_function(x1, x2, wrapper.cplx2)
272271

0 commit comments

Comments
 (0)