I have x
and y
numpy matrixes of coordinates. .shape
of each is (1000,1200). x
and y
have been created in fact with np.meshgrid()
. I also created z
, a numpy matrix of zeros same size as the fore-mentioned x
,y
. I have a polygon defined by its vertices.
What's the fastest way to substitute in z
the zeros inside that polygon to ones values?
I tried matplotlib.path
and Shapely
functions, but all solutions seem to take too long. Can you provide me with a quick implementation that can easily handle [1000x1200] matrixes?