Benefit of NumPy arrays over Python arrays Improve Improve Like Article Like Save Share Report The need for NumPy arises when we are working with multi-dimensional arrays. The traditional array module does not support multi-dimensional arrays. Let’s first try to create a single-dimensional array (i.e one row & multiple columns) in Python without installing NumPy Package to get a more clear picture. Python3 from array import * arr = array('i', [25, 16, 3]) print(arr) Output: array('i', [25, 16, 3]) Now, Let’s try to create a multi-dimensional array by using the array module. Python3 from array import * arr = array('i', [25, 16, 3], [5, 19, 28]) print(arr) Output: TypeError: array() takes at most 2 arguments (3 given) We see that the array module does not support multi-dimensional array, this is where we require NumPy. NumPy supports large, multi-dimensional arrays and has a large collection of high-level math functions that can operate on those arrays. Let’s use NumPy to create a multi-dimensional array. Python3 from numpy import * arr = array ([[25, 31, 3], [5, 19, 28]]) print(arr) Output: [[25 31 3] [ 5 19 28]] Last Updated : 05 Sep, 2020 Like Article Save Article Previous numpy.find_common_type() function - Python Next Returning a function from a function - Python Share your thoughts in the comments Add Your Comment Please Login to comment... Similar Reads Integrate a Hermite_e series Over Axis 0 using Numpy in Python Python - Iterate over Columns in NumPy Evaluate a Polynomial at Points x Broadcast Over the Columns of the Coefficient in Python using NumPy Integrate a Legendre series over axis 0 using NumPy in Python Return the Norm of the vector over given axis in Linear Algebra using NumPy in Python Averaging over every N elements of a Numpy Array How to Map a Function Over NumPy Array? Python | Numpy numpy.resize() Python | Numpy numpy.transpose() Python | Numpy numpy.ndarray.__lt__() Like A anshitaagarwal Follow Article Tags : Python-numpy Python Practice Tags : python