Skip to content

python 2.7 numpy array cast error #4

@statham-stone

Description

@statham-stone

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions