MCPcopy Index your code
hub / github.com/numpy/numpy / __pow__

Method __pow__

numpy/lib/_polynomial_impl.py:1375–1381  ·  view source on GitHub ↗
(self, val)

Source from the content-addressed store, hash-verified

1373 return poly1d(polyadd(self.coeffs, other.coeffs))
1374
1375 def __pow__(self, val):
1376 if not isscalar(val) or int(val) != val or val < 0:
1377 raise ValueError("Power to non-negative integers only.")
1378 res = [1]
1379 for _ in range(val):
1380 res = polymul(self.coeffs, res)
1381 return poly1d(res)
1382
1383 def __sub__(self, other):
1384 other = poly1d(other)

Callers

nothing calls this directly

Calls 3

isscalarFunction · 0.90
poly1dClass · 0.85
polymulFunction · 0.70

Tested by

no test coverage detected