How to find NumPy array size

You can find NumPy array size in Python with the following code. If you want to learn Python then I will highly recommend you to read This Book.

How to find NumPy array size
How to find NumPy array size

NumPy Array Size

You can easily find the size of the NumPy array with the help of the np.size() method. It will give the total number of elements of an array. In the given example, the size of the array is 6.

import numpy as np
a = [10,21,12,14,51,6]
x = np.size(a)
print(x)

People are also reading:

Best Python Books

What is Computer Vision? Examples, Applications, Techniques

Top 10 Computer Vision Books with Python

Books for Machine Learning (ML)

Free Learning Resources

Leave a Comment

Your email address will not be published.