# Tag Archives: Python numpy-arrayManipulation

While working with arrays many times we come across situations where we need to change the shape of that array but it is a very… Read More
In this article, we will discuss how to return a boolean array that is True where the string element in the array ends with a… Read More
In this article, we will discuss how to convert a 1D array of tuples into a numpy array. Example: Input: [(1,2,3),(‘Hi’,’Hello’,’Hey’)] Output: [[‘1’ ‘2’ ‘3’]… Read More
In this article, we are going to see how to map a function over a NumPy array in Python. numpy.vectorize() method The numpy.vectorize() function maps… Read More
In this article, we are going to see how to count the number of non-NaN elements in a NumPy array in Python. NAN: It is… Read More
In this article, we will learn how to remove rows from a NumPy array based on multiple conditions. For doing our task, we will need… Read More
In this article, we are going to see how to set the axis for rows and columns in NumPy. Functions Used np.array(object): to create a… Read More
In this article, we are going to see how to perform a comparison and filtering of the NumPy array. Comparing NumPy Array: Let’s see the… Read More
In this article, we are going to see how to apply the filter by the given condition in NumPy two-dimensional array. We have to obtain… Read More
Numpy library provides a function called numpy.all() that returns True when all elements of n-d array passed to the first parameter are True else it… Read More
In this article, we will discuss how to filter rows of NumPy array by multiple conditions. Before jumping into filtering rows by multiple conditions, let… Read More
Here we will learn how to convert 1D NumPy to 2D NumPy Using two methods. Numpy is a Python package that consists of multidimensional array… Read More
Prerequisites: Numpy Two arrays in python can be appended in multiple ways and all possible ones are discussed below. Method 1: Using append() method This… Read More
Prerequisite Differences between Flatten() and Ravel() Numpy Functions, numpy.ravel() in Python,  In this article, we will see how we can flatten a list of numpy… Read More
Prerequisite: numpy This numpy inbuilt function suppresses whole columns that contain masked values in a 2-D array. Syntax:  numpy.ma.compress_cols(arr) Parameters :  arr : [array_like, MaskedArray]… Read More