Premium problem46. Coordinate Grid

Medium Locked

Return the x and y coordinate grids covering the [0,1] × [0,1] area, stacked into a single (2, 5, 5) array:

  • 5 evenly-spaced points per axis
  • index 0 holds the x grid
  • index 1 holds the y grid

Output

[[[0.   0.25 0.5  0.75 1.  ]
  [0.   0.25 0.5  0.75 1.  ]
  [0.   0.25 0.5  0.75 1.  ]
  [0.   0.25 0.5  0.75 1.  ]
  [0.   0.25 0.5  0.75 1.  ]]

 [[0.   0.   0.   0.   0.  ]
  [0.25 0.25 0.25 0.25 0.25]
  [0.5  0.5  0.5  0.5  0.5 ]
  [0.75 0.75 0.75 0.75 0.75]
  [1.   1.   1.   1.   1.  ]]]

Premium problem

This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.

Implement solve(...)