79125995

Date: 2024-10-25 13:56:41
Score: 0.5
Natty:
Report link

When you call mypolygon == point, numpy performs element wise comparison maintaining dimensions of the coordinates:

np.where() returns array with indices by dimension, where the values in point occur in mypolygon (at same columns). It is "3-dimensionnal" because it found 3 occurences:

for what you are trying to achieve, you could use:

print(np.all(mypolygon == point, axis=1))
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Starts with a question (0.5): When you
  • Low reputation (1):
Posted by: mosfet