Data Warehousing
What is Data Lake? It's Architecture
What is Data Lake? A Data Lake is a storage repository that can store large amount of structured,...
The Numpu matmul() function is used to return the matrix product of 2 arrays. Here is how it works
1) 2-D arrays, it returns normal product
2) Dimensions > 2, the product is treated as a stack of matrix
3) 1-D array is first promoted to a matrix, and then the product is calculated
numpy.matmul(x, y, out=None)
Here,
x,y: Input arrays. scalars not allowed
out: This is optional parameter. Usually output is stored in ndarray
Example:
In the same way, you can compute matrices multiplication with np.matmul
### Matmul: matruc product of two arrays h = [[1,2],[3,4]] i = [[5,6],[7,8]] ### 1*5+2*7 = 19 np.matmul(h, i)
Output:
array([[19, 22], [43, 50]])
Last but not least, if you need to compute the determinant, you can use np.linalg.det(). Note that numpy takes care of the dimension.
## Determinant 2*2 matrix ### 5*8-7*6np.linalg.det(i)
Output:
-2.000000000000005
What is Data Lake? A Data Lake is a storage repository that can store large amount of structured,...
Tableau can create interactive visualizations customized for the target audience. In this...
What is Data Mart? A Data Mart is focused on a single functional area of an organization and...
$20.20 $9.99 for today 4.6 (115 ratings) Key Highlights of Data Warehouse PDF 221+ pages eBook...
Security Information and Event Management tool is a software solution that aggregates and analyses activity...
Tableau is a data visualization tool that can connect to almost any data source. However, its...