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 to 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


To create an array in Python by using the numpy module, we first need to import the module and call its zeros() function, 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

C#, PYTHON and DJANGO


Advertisement