gnumpy
gnumpy copied to clipboard
python 2.7 numpy array cast error
import numpy as np import gnumpy as gp gp.garray(np.ones([10000,100000])) garray([[ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], ..., [ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.], [ 1., 1., 1., ..., 1., 1., 1.]]) gp.garray(np.ones([100000,100000])) Traceback (most recent call last): File "
", line 1, in File "/users4/qkshi/anaconda2/lib/python2.7/site-packages/gnumpy.py", line 731, in init if npa.size!=0: cm.numpy_array[:] = npa.reshape((-1, 1), order='C') # no cudamat.reformat is needed, because that's only dtype and order change, which are handled by the assignment anyway ValueError: could not broadcast input array from shape (10000000000,1) into shape (1410065408,1)