# Tag Archives: Python numpy-arrayManipulation

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. Method 1: numpy.vectorize() method The numpy.vectorize()… 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
Numpy is a Python package that consists of multidimensional array objects and a collection of operations or routines to perform various operations on the 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
numpy.ma.compress_rowcols() function suppresses rows and columns that contain masked values in a 2-D array. The suppression behavior is selected with the axis parameter:  If axis is… Read More
Many times we have non-numeric values in NumPy array. These values need to be removed, so that array will be free from all these unnecessary… Read More