Skip to content

# Tag Archives: Python-numpy

An array can be considered as a container with the same types of elements. Python has its array module named array. We can simply import… Read More
In numpy, we can check that whether none of the elements of given array is zero or not with the help of numpy.all() function. In… Read More
In NumPy, We can compute pearson product-moment correlation coefficients of two given arrays with the help of numpy.corrcoef() function. In this function, we will pass… Read More
Let us see how to append values at the end of a NumPy array. Adding values at the end of the array is a necessary… Read More
Given an m X n matrix A and a p X q matrix B, their Kronecker product is A ⊗ B, also called their matrix… Read More
In this article, we will see the program for creating an array of elements in which every element is the average of every consecutive subarrays… Read More
While working with NumPy, you might have seen some functions return the copy whereas some functions return the view. The main difference between copy and… Read More
Let us see how to repeat all elements of the given array of string 3 times. Example : Input : [‘Akash’, ‘Rohit’, ‘Ayush’, ‘Dhruv’, ‘Radhika’]… Read More
The shape of an array can be defined as the number of elements in each dimension. Dimension is the number of indices or subscripts, that… Read More
Random numbers are the numbers that cannot be predicted logically and in Numpy we are provided with the module called random module that allows us… Read More
Images are an easier way to represent the working model. In Machine Learning, Python uses the image data in the format of Height, Width, Channel… Read More
In NumPy, we can find common values between two arrays with the help intersect1d(). It will take parameter two arrays and it will return an… Read More
In NumPy we can find the length of one array element in a byte with the help of itemsize . It will return the length… Read More
In the NumPy with the help of shape() function, we can find the number of rows and columns. In this function, we pass a matrix… Read More
In this article, let’s discuss how to swap columns of a given NumPy array. Approach : Import NumPy module Create a NumPy array Swap the… Read More