# Numpy

## How to select row by Index NumPy array

In this post, We will learn, How to select row by Index in the NumPy array. To select the element from NumPy or Matrix by Index, we pass the rows and columns index inside the square bracket [][]. We will cover select elements by row and column index in 2D Numpy array. 1. How to …

## Access rows of Mutidimesional NumPy array

In this post, we are going to understand how to Access rows of Mutidimesional NumPy array 2D or 3D with examples. To use the NumPy library and its function it must be installed on the local machine. 1. Access row of Mutidimesional NumPy array 2D In this example Python example, we are accessing rows of …

## How to delete last N row of NumPy array

In this post, we are going to understand how to delete the last N row of the NumPy array with examples by using the slice operator and np.delete() method examples. To run all these programs, make sure numpy is installed on the local machine. 1.How to delete last N rows of NumPy array using loop …

## How to select last N rows of NumPy array

In this post, we are going to learn how to select last N rows of NumPy array with examples. To select the last N rows from the NumPy array negative is used. We will cover getting the last row by using negative indexing and selecting the last N row by using the np.r_ () function, …

## How to get first n rows of NumPy array(4 ways)

In this post, we are going to learn how to get first n rows of NumPy array with examples. To select the first N rows and first n element from the NumPy array slicing and indexing is used. We will cover getting the first n element by using slicing, selecting the first n row based …

## How to select rows from NumPy array

In this post, we are going to learn how to select rows from NumPy array 2D or 3D with examples. We will use slicing or Ellipsis or np. r_[] method.We will cover selecting multiple rows from the NumPy array, selecting multiple rows by index, Selecting the last row from the NumPy array, and selecting a …

## How to convert NumPy array float64 to int

In this post, we are going to learn how to convert NumPy array float64 to int with examples by using the NumPy library built-in function astype(), int_(), and NumPy.asarray(). Whenever we pass a float type element to a function that expects an integer TypeError: ‘numpy.float64’ object cannot be interpreted as an integer. To solve this …

## How to filter NumPy array by two conditions

In this post, we are going to learn How to filter the NumPy array by two conditions.We are going to use NumPy built-in function logical_and(), np.greater(),np.less() ,logical_not(),logical_or() or in some example we have used Numpy logical AND and OR operator.To use a NumPy library first we have to install it on the local machine and …

## How to Repeat Column in NumPy array

In this post, we are going to learn How to Repeat Columns in a NumPy array with examples. We have used the Numpy library built-in function transpose() and tile() and hstack() to repeat columns. To run and use the NumPy library it must be installed on a local machine. After installation, we can import it …

## Convert NumPy array to JSON Python(5ways)

In this post, we are going to learn to Convert NumPy array to JSON Python with examples.We will use the JSON module that is imported using “import JSON“, First need to make sure the JSON module is installed or we can install it using “pip install jsonlib-python3” .NumPy land Pandas Library. 1. Convert NumPy array to JSON …