如何解决ufunc 'square' not supported ……错误
fig = plt.figure()
ax = Axes3D(fig)
X=np.array(Length)
Y=np.array(Viscera)
X,Y=np.meshgrid(X,Y)
R=np.sqrt(X**2+Y**2)
#height value
Z=np.sin(R)
ax.plot_surface(X,Y,Z,rstride=1,cstride=1,cmap=plt.get_cmap('rainbow'))
ax.contourf(X,Y,Z,zdir='z',offset=-2,cmap='rainbow') #等高线图 即下面的部分
ax.set_zlim(-2,2)
改成列表和元组形式都出现一下错误
ufunc 'square' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
- 点赞
- 写回答
- 关注问题
- 收藏
- 复制链接分享
- 邀请回答
为你推荐
- 谁能解决这个python难题?
- python
- 4个回答
- Docker安装报错 Containers Windows Feature is not available,别的地方都找不到解决方案。
- docker
- 2个回答
- springboot: Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported
- java
- spring
- 1个回答
- 终端中的Golang错误
- macos
- 2个回答
- UTF8双重编码错误
- character-encoding
- php
- utf-8
- mysql
- 3个回答
- PayPal API - CURRENCY_NOT_ALLOWED
- rest
- paypal
- php
- 1个回答
- centos7 安装glibc2.23,configure: error: The x86_64 is not supported.
- python
- linux
- 1个回答
- INSERTING到数据库时MySQL错误号:1064
- php
- mysql
- 1个回答
- 关于图片转base64格式时的错误
- javascript
- html5
- jquery
- 5个回答
- C++编译时,dynet的nodes.cc出错:THIS_TYPE_IS_NOT_SUPPORTED,怎么解决?
- c++
- 2个回答
- Servlet验证出现405错误,HTTP method POST is not supported by this URL
- servlet
- 0个回答
- HTTP method POST is not supported by this URL
- 3个回答
- Same or not
- each
- 1个回答
- 控制台报Content type 'application/json' not supported
- ajax
- jquery
- 3个回答
- SHH整合框架报这种错误,该怎么做
- ssh框架报这种错误
- 该怎么做
- 2个回答
- servlet页面报 405 - HTTP method GET is not supported
- servlet
- java
- 3个回答
- SpringMVC出现 Request method 'POST' not supported 错误
- 5个回答
- 剪切图片 Editing is not supported for this image
- 4个回答
- Redis的PFADD命令执行错误
- redis
- 2个回答
- win系统64位使用python安装pysqlite时出现错误!求大神解答
- sql
- 安装
- python
- 错误
- 64位
- 4个回答