報錯信息ax = axes if axes else plt.gca() ValueError: The truth value of an array with more than one ele

ax = axes if axes else plt.gca()

ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

這個報錯信息是因爲ax是一個數組,而我們期待的是ax[i]。注意i是指第i個元素。
將ax傳遞成a[i]即可。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章