且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

具有多个元素的数组的真值是不明确的错误?Python

更新时间:2022-03-09 03:28:21

您可以使用 np.vectorize 来解决此错误,该错误在将 and 与标量一起使用时发生价值和误入歧途.通话看起来像

You can use np.vectorize to get around this error which occurs when using and with a scalar value and arrray. The call looks like

np.vectorize(TentMap)(a,xaxis)