gnumpy icon indicating copy to clipboard operation
gnumpy copied to clipboard

python 2.7 numpy array cast error

Open statham-stone opened this issue 7 years ago • 0 comments

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)

statham-stone avatar Jan 26 '18 07:01 statham-stone