MemoryError for np.array
MemoryError is exactly what it means, you have run out of memory in your RAM for your code to execute. 

When this error occurs it is likely because you have loaded the entire data into memory. For large datasets you will want to use batch processing. Instead of loading your entire dataset into memory you should keep your data in your hard drive and access it in batches. If you are using Keras there is a helper class with a very efficient implementation of batch processing. Take a look at this blog post. This is a good starting point for avoiding MemoryError. 



As a short term fix you can train your model using a subset of the data available to you and discard the rest. Doing this really is a shame however.