Task: Fast Replacement of Values in a NumPy Array
Task: Fast Replacement of Values in a NumPy Array: a task in Terminal-Lego-15k (Harbor dataset). Implement a Python solution that efficiently replaces values in a large NumPy array using a dictionary mapping. The solution must handle arrays containing up to a million elements while only replacing…
The task
Implement a Python solution that efficiently replaces values in a large NumPy array using a dictionary mapping. The solution must handle arrays containing up to a million elements while only replacing a small subset of elements that appear as keys in the provided dictionary.
Part of PrimeIntellect/Terminal-Lego-15k.