Advertisement



< Prev
Next >



Python - Array from Numpy Module





In our previous article, we have introduced you to the concept of an array in Python and how we could create an array and perform array operations using the array module of Python. In this article, we are going to introduce you another module named numpy which stands for numerical python, using which we could create an array and also perform general and numerical array operations.




Creating an array in Python using the numpy module


In order to create an array in Python using a special module named numpy, we need to import the numpy module and call its zeros method, which will create an array with all its elements initialized to zero. Let us look at the syntax of this function.



Syntax of zeros() function -
zeros(shape, datatype, order)

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement

Notifications



Please check our latest addition

PYTHON and DJANGO


Advertisement