我試圖計算一組點和線段之間的最短距離。一切都很順利,直到它使用兩組數組中的值來計算距離,一組用於x距離,另一組用於y距離。ValueError是什麼意思?
計算距離的線路是:
d = np.sqrt(dx**2 + dy**2).
它告訴我說::
ValueError: operands could not be broadcast together with shapes (3312,) (0,)
我以前使用的腳本與另一組值和它完美的作品。但現在它不再有了。我試圖找出錯誤信息的含義,但迄今爲止尚未成功。有人可以幫忙嗎?
可能重複的能不能與形狀一起播出](http://stackoverflow.com/questions/11856493/numpy-operands-could-not-be-broadcast-together-with-shape) – Azd325 2015-04-06 08:29:08