pow function fixed in _math.py

This commit is contained in:
Nicolas 2025-12-24 14:11:12 +01:00
parent 662a168d90
commit aacdc9b676
1 changed files with 2 additions and 2 deletions

View File

@ -79,10 +79,10 @@ def pow(x: VecNumLike, y: VecNumLike) -> Any:
for _ in range(y - 1):
m *= x
return m
if y == -1:
return 1 / x
if isinstance(x, value) or isinstance(y, value):
return add_op('pow', [x, y])
elif y == -1:
return 1 / x
else:
return float(x ** y)