Python TypeError:大小不佳的对象的len()

尝试绘制图表时出现错误。

TypeError:len()个未调整大小的对象

def obj_func(x,y):
    suma=(x*m.sin(m.sqrt(abs(x)))+y*m.sin(m.sqrt(abs(y))))
    y=418.9829*2 - suma
    return y
from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
wykres = plt.figure()
ax = wykres.gca(projection='3d')
x=np.arange(-1.5,1.5,0.25)
y=np.arange(-1.5,1.5,0.25)
x,y=np.meshgrid(x,y)
z = np.vectorize(obj_func)
zz=z(x,y)
ax.set_xlabel('OS x')
ax.set_ylabel('OS Y')
ax.set_zlabel('f(x,y)')
ax.plot_surface(x, y, zz ,50, cmap='binary')
wykres.suptitle('Wykres f(x,y)')
plt.show()