=====Function Descriptions=====
inner

The inner tool returns the inner product of two arrays.

import numpy

A = numpy.array([0, 1])
B = numpy.array([3, 4])

print numpy.inner(A, B)     #Output : 4

outer

The outer tool returns the outer product of two arrays.

import numpy

A = numpy.array([0, 1])
B = numpy.array([3, 4])

print numpy.outer(A, B)     #Output : [[0 0]
                            #          [3 4]]

=====Problem Statement=====
You are given two arrays: A and B.
Your task is to compute their inner and outer product.

=====Input Format=====
The first line contains the space separated elements of array A.
The second line contains the space separated elements of array B.

=====Output Format=====
First, print the inner product.
Second, print the outer product.

Difficulty: introductory

Starter code:

import numpy

Solutions:
import numpy
np_ar1 = numpy.array(list(map(int,input().split())))
np_ar2 = numpy.array(list(map(int,input().split())))
print((numpy.inner(np_ar1,np_ar2)))
print((numpy.outer(np_ar1,np_ar2)))


import numpy as np

arr1 = np.array(list(map(int, input().strip().split())))
arr2 = np.array(list(map(int, input().strip().split())))

print((np.inner(arr1, arr2)))
print((np.outer(arr1, arr2)))