Reputation: 31
I was loading this but it says error.
import pandas as pd
import numpy as np
userMovie = np.load('userMovieMatrixAction.npy')
numberUsers, numberGenreMovies = userMovie.shape
genreFilename = 'Action.csv'
genre = pd.read_csv(genreFilename)
MemoryError: Unable to allocate 3.63 GiB for an array with shape (487495360,) and data type float64 What can I do? It's driving me crazy.
Upvotes: 1
Views: 646
Reputation: 17
You are starting to build a recommender system as far I can see ....
Upvotes: 2
Reputation: 5223
If the program runs out of memory, it seems like an issue with overcommit handling of your operative system. If you are in Linux, you can try to run the following command to enable "always overcommit" mode, which can help you load the 3.63GiB npy file with numpy
:
$ echo 1 > /proc/sys/vm/overcommit_memory
Upvotes: 2