tfl.test_utils.two_dim_mesh_grid

Generates uniform 2-d mesh grid for 3-d surfaces visualisation via pyplot.

Uniformly distributes 'num_points' within rectangle: (x_min, y_min) - (x_max, y_max) 'num_points' should be such that uniform distribution is possible. In other words there should exist such integers 'x_points' and 'y_points' that:

  • x_points * y_points == num_points
  • x_points / y_points == (x_max - x_min) / (y_max - y_min)

num_points number of points in the grid.
x_min bounds of the grid.
y_min bounds of the grid.
x_max bounds of the grid.
y_max bounds of the grid.

Tuple containing 2 numpy arrays which represent X and Y coordinates of mesh grid

ValueError if it's impossible to uniformly distribute 'num_points' across specified grid.