8 results · AI-generated index
N
numpy.org
official

NumPy: Conditional Replace Values in Array

Use numpy.where() to replace values in an array based on conditions. This function allows you to specify multiple conditions and replacement values.

S
stackoverflow.com
article

Conditional Replacement of Values in NumPy Arrays

You can use numpy.select() to replace values in an array based on multiple conditions. This function takes a list of conditions and a list of replacement values as input.

T
towardsdatascience.com
article

Replacing Values in NumPy Arrays Based on Multiple Conditions

This article provides an example of how to use numpy.where() and numpy.select() to replace values in an array based on multiple conditions. It also discusses the performance differences between these two functions.

P
python.org
official

NumPy Conditional Operations

The numpy library provides several functions for performing conditional operations, including numpy.where(), numpy.select(), and numpy.putmask(). These functions can be used to replace values in an array based on multiple conditions.

R
realpython.com
article

Replacing Values in NumPy Arrays

This tutorial provides an overview of how to replace values in NumPy arrays using numpy.where() and numpy.select(). It also discusses how to use these functions with multiple conditions.

G
geeksforgeeks.org
article

Conditional Replacement of Values in NumPy Arrays Using List Comprehensions

This article provides an example of how to use list comprehensions to replace values in a NumPy array based on multiple conditions. It also discusses the advantages and disadvantages of this approach.

G
github.com
tool

NumPy Array Conditional Replacement

This GitHub repository provides a collection of examples and functions for replacing values in NumPy arrays based on multiple conditions. It includes examples of how to use numpy.where(), numpy.select(), and other functions.

A
arxiv.org
research

Efficient Conditional Replacement of Values in Large NumPy Arrays

This research paper discusses the performance of different methods for replacing values in large NumPy arrays based on multiple conditions. It provides a comparison of the performance of numpy.where(), numpy.select(), and other functions.