How to calculate inner matrix product in Ipython

ipython

#1

I want to calculate the inner matrix product(XTX) of a matrix in Ipython but how I can achieve this in Ipython

my matrix is

In [115]: arr = np.arange(16).reshape((2, 2, 4))
In [116]: arr
Out[116]:
array([[[ 0, 1, 2, 3],
[ 4, 5, 6, 7]],
[[ 8, 9, 10, 11],
[12, 13, 14, 15]]])

#2

@sid100158-
You can directly use the function np.dot which computes the dot product between two arrays.

np.dot(arr.T, arr)

Hope this helps!

Regards,
Hinduja