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.
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 implementationxp.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.