Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • 1
    We normally write indexing as arr[x,y,z]. Ideally the indices will be arrays or slices. What kinds of values can your function take? Just scalars, or arrays? In other words can you only set individual elements at a time, or can you set blocks or ranges? Commented Oct 11, 2025 at 21:45
  • Your example works with array inputs. There are a number ways of generating the required arrays. Commented Oct 11, 2025 at 23:40
  • Look at the suggested ogrid arrays. Maybe even try to creat them from scratch. It'll be a good learning step. Commented Oct 12, 2025 at 0:43