numpy the package numpy (module name numpyprovides the building blocks for scientific computing in python it contains all the standard mathematical functionssuch as sincostanetc as well as efficient functions for random number generationlinear algebraand statistical computation import numpy as np import the package np cos ( data [ , , , , np mean(dataz np std(dataprint ('cos ( { : fmean { std { format ( , , )cos ( mean std creating and shaping arrays the fundamental data type in numpy is the ndarray this data type allows for fast matrix operations via highly optimized numerical libraries such as lapack and blasthis in contrast to (nestedlists as suchnumpy is often essential when dealing with large amounts of quantitative data ndarray objects can be created in various ways the following code creates array of zeros think of it as -dimensional matrix or two stacked matrices np zeros ([ , , ] by by array of zeros print (aprint ( shape number of rows and columns print (type( ) is an ndarray [[ ][ ]]( we will be mostly working with arraysthat isndarrays that represent ordinary matrices we can also use the range method and lists to create ndarrays via the array method note that arange is numpy' version of rangewith the difference that arange returns an ndarray object np array range ( )equivalent to np arange ( np array ([ , , , ] np array ([[ , , ,[ , , ]]print ( '\ ' ,'\nc[ [