Open
Description
Using this library, I have found frequently that I need to set an entire vector at a time when manipulating the ndarray. For example:
const n = ndarray([1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 2]);
const newVector = n.pick(0, 0);
for (let i = 0; i < n.shape[3]; i++) {
n.set(1, 1, j, newVector.get(j));
}
Is there an intended way to handle this redundancy? Ideally:
const n = ndarray([1, 2, 3, 4, 5, 6, 7, 8], [2, 2, 2]);
const newVector = n.pick(0, 0);
n.set(1, 1, newVector);
Context:
Writing an image processing library. I wrote a median filter for the image. I need iterate over all the pixels and set them to the median of their neighbors.
Metadata
Metadata
Assignees
Labels
No labels