成功解决IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (100,)
解决 not with 成功 be 100 could Arrays
2023-09-14 09:04:51 时间
成功解决IndexError: shape mismatch: indexing arrays could not be broadcast together with shapes (100,)
目录
解决问题
Index Error: shape mismatch: indexing arrays could not be broadcast together with shapes (100,) (100,10)
解决思路
索引错误:形状不匹配:索引数组无法与形状(100,)一起广播(100,10)。
当使用其他整数类型的多维数组,访问numpy多维数组时,用于索引的数组需要具有相同的形状。numpy将会被允许去广播(如果可能的话),所以,若要为了实现这一点,数组需要具有相同的维数。
参考文章
Stack overflow:shape mismatch: indexing arrays could not be broadcast together with shapes
Indexing Multi-dimensional arrays
解决方法
使两个numpy数组保持形状一致即可!
相关文章
- 解决百度 ueditor v1.4.3 编辑器上传图片失真的bug?
- 解决Office 2013无法打开文件并提示错误的问题
- g++: command not found的解决
- 成功解决YOLOv3测试——could not create cudnn handle: CUDNN_STATUS_NOT_INITIALIZE作记录
- 成功解决TypeError: ‘method‘ object is not subscriptable
- 成功解决NVIDIA安装程序无法继续 Ths OCH driver package is not conmtibIe with the currently uistalled version of
- 成功解决(wait)KeyError: "The name 'image_tensor:0' refers to a Tensor which does not exist. The operatio
- 【已解决】-bash: lsof: command not found
- 已解决Running setup.py install for wxPython did not run successfully.
- 已解决UnicodeDecodeError: ‘ascii‘ codec can‘t decode byte 0x8e in position 0: ordinal not in range(128)
- -bash: rz: command not found的解决方法
- 全网完美地解决Content type ‘multipart/form-data;boundary=----------0467042;charset=UTF-8‘ not supported)的问题
- ubuntu eclipse 建立server 提示coud not load the tomcat server configuration at /opt/apache ...的解决方法
- 如何解决This system is not registered with RHN.
- Error(s) in loading state_dict for ResNet 问题解决
- ZooKeeper 到底解决了什么问题