Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def f(x):
- return 3 * x**2 + 2 * x + 1
- def compute_poly_vectorized(abscissa: np.ndarray) -> np.ndarray:
- return f(abscissa)
- a = np.array([1, 2, 3, 4, 5])
- res = compute_poly_vectorized(a)
- print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement