(self, val)
| 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) |