Numpy Core Exceptions Memory Error