I am using the Google Colab enviroment.
The file I am using can be found here. It is a csv file
https://drive.google.com/open?id=1v7Mm6S8BVtou1iIfobY43LRF8MgGdjfU
Warning: it has several million rows.
This code runs within a minute in Google Colab Python 3 notebook. I tried this several times with no problem.
from numpy import genfromtxt
my_data = genfromtxt('DlRefinedRatings.csv', delimiter=',' , dtype=int)
print(my_data[0:50])
The code below, on the other hand, runs for several minutes before disconnecting from Google Colab's server. I tried multiple times. Eventually colab gives me a 'running out of memory' warning.
from numpy import genfromtxt
my_data = genfromtxt('DlRefinedRatings.csv', delimiter=',' , dtype=int, names=True)
print(my_data[0:50])
It seems that there used to be an issue with names=True in Python 3 but that issue was fixed https://github.com/numpy/numpy/issues/5411
I check which version I was using in Colab and it was up to date
import numpy as np
print(np.version.version)
>1.14.3