Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import numpy as np
- def sum_arrays_vectorized(
- lhs: np.ndarray,
- rhs: np.ndarray,
- ) -> np.ndarray:
- # ваш код
- if np.shape(lhs) != np.shape(rhs):
- raise ValueError("ShapeMismatchError")
- return lhs + rhs
- print(sum_arrays_vectorized([1, 2], [0,0,0, 0, 3]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement