HackerRank- Python Inner and Outer
Compute their inner and outer product of two arrays.
- import numpy as np
- A = np.array(input().split(), int)
- B = np.array(input().split(), int)
- print(np.inner(A,B), np.outer(A,B), sep='\n')
Compute their inner and outer product of two arrays.
- import numpy as np
- A = np.array(input().split(), int)
- B = np.array(input().split(), int)
- print(np.inner(A,B), np.outer(A,B), sep='\n')
Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.