问题
I am using jupyter notebook with python3 on windows 10. My computer have 8GB RAM and at least 4GB of my RAM is free.
But when I want to make a npArray with size of 6000*6000 with this command:
np.zeros((6000, 6000), dtype='float64')
I got this : Unable to allocate array with shape (6000, 6000) and data type float64
I dont think it could take more then 100MB RAM.
I tried to change the number too see what happens. biggest shape i can make is (5000,5000). Do i made a mistake in estimate of RAM i need ?
回答1:
Jupyter notebook has a default memory limit size. You can try to increase the memory limit by following the steps:
1) Generate Config file using command:
jupyter notebook --generate-config
2) Open jupyter_notebook_config.py file situated inside 'jupyter' folder and edit the following property:NotebookApp.max_buffer_size = your desired value
Remember to remove the '#' before the property value.3) Save and run the jupyter notebook. It should now utilize the set memory value. Also, don't forget to run the notebook from inside the jupyter folder.
Alternatively, you can simply run the Notebook using below command:
jupyter notebook --NotebookApp.max_buffer_size=your_value
来源:https://stackoverflow.com/questions/57948003/jupyter-notebook-memory-limit