成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)

原因

看了网上的一些解决方案,应该是跟内存有关。

尝试解决

1.修改pycharm的运行内存(未解决)

打开pycharm64.exe.vmoptions进行编辑修改,把 -Xmx750m改为 -Xmx8192m,分配8G内存,内存分配视情况而定。保存并重启pycharm。

成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第1张图片成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第2张图片

2.修改虚拟内存(解决)

视情况设置需要的虚拟内存。

成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第3张图片

成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第4张图片

成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第5张图片

成功解决Unable to allocate xxx MiB for an array with shape (xxxx, xxxx)_第6张图片

你可能感兴趣的:(pycharm,ide,python)