meshgrid 사용

import numpy as np
delta = 1
x = np.arange(0, 4, delta)
y = np.arange(0, 4, delta)

X, Y = np.meshgrid(x, y)
print(x)
print(X)
print(Y)


[0 1 2 3]
[[0 1 2 3]
[0 1 2 3]
[0 1 2 3]
[0 1 2 3]]
[[0 0 0 0]
[1 1 1 1]
[2 2 2 2]
[3 3 3 3]]