Answers for "combine two coordiante matrixs into 1"

0

combine two coordiante matrixs into 1

x = np.linspace(x_min, x_max,num_x)
y = np.linspace(y_min, y_max,num_y)

XY = np.meshgrid(x,y)
# Here you have a tuple of 2 coordinate matrix

mat = np.array(XY).transpose()
# Transpose will transform your (2,num_y,num_x) array into
# the desired (num_x,num_y,2) array.
Posted by: Guest on February-24-2020

Code answers related to "combine two coordiante matrixs into 1"

Browse Popular Code Answers by Language