PyErr_SetString(PyExc_TypeError,"can't copy into un-initialized CudaNdarray");
PyErr_SetString(PyExc_TypeError,
"can't copy into un-initialized CudaNdarray");
return-1;
return-1;
}
}
if(self->nd!=other->nd)
if(self->nd!=other->nd)
{
{
PyErr_Format(PyExc_NotImplementedError,"CudaNdarray_CopyFromCudaNdarray: need same number of dims. destination nd=%d, source nd=%d. No broadcasting implemented.",self->nd,other->nd);
PyErr_Format(PyExc_NotImplementedError,
"CudaNdarray_CopyFromCudaNdarray: need same number of"
" dims. destination nd=%d, source nd=%d."
" No broadcasting implemented.",
self->nd,other->nd);
return-1;
return-1;
}
}
//standard elemwise dim checks (also compute total size)
//standard elemwise dim checks (also compute total size)