Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

ENH: new function `replace`

Open Beginner friendly
#992 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
python
Domain
data

Research direction

Start with the contributor guide at data-apis.org/array-api-extra/contributing.html, then inspect existing array functions using xp.where and xp.equals. Add the proposed xp.replace(array, old, new) behavior and verify that the function is exposed and tested consistently with the project’s existing conventions.

Written by the indexing model from the issue text.

Description

enhancement new function

From https://hackmd.io/zn5bvdZTQIeJmb3RW1B-8g?both#Updates-from-the-sparse-array-ecosystem-Willow, @willow-ahrens suggested an xp.replace(array, old, new) function, which could have the agnostic implementation xp.where(xp.equals(...), old, new ).

@willow-ahrens if you'd like to work on this, we have contributor docs at https://data-apis.org/array-api-extra/contributing.html.

Dominant language
Python
Stars
33
Forks
32
Avg merge
5h 58m
Merged PRs (30d)
47

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from data-apis/array-api-extra

All issues in data-apis/array-api-extra

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.