You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was trying to follow the documentation in order to create a sparse matrix of type csr
import arrayfire as af
x = af.sparse.create_sparse_from_host([1,2], [1, 2], [1, 2], nrows=int(123), ncols=int(123))
though i am having this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "G:\behery_tools\Python36\lib\site-packages\arrayfire\sparse.py", line 93, in create_sparse_from_host
return create_sparse(to_array(values), to_array(row_idx), to_array(col_idx), nrows, ncols, storage)
File "G:\behery_tools\Python36\lib\site-packages\arrayfire\sparse.py", line 60, in create_sparse
values.arr, row_idx.arr, col_idx.arr, storage.value))
File "G:\behery_tools\Python36\lib\site-packages\arrayfire\util.py", line 79, in safe_call
raise RuntimeError(to_str(err_str))
RuntimeError: In function af_err __cdecl af_create_sparse_array(void **,const __int64,const __int64,void *const ,void *const ,void *const ,const af_storage)
In file src\api\c\sparse.cpp:85
Invalid argument at index 4
Expected: rInfo.getType() == s32
I am not sure what is the main cause of the error here; as much as i know i am passing the correct types for all the args. Can anyone provide an example ?
The text was updated successfully, but these errors were encountered:
mlloreda
added a commit
to mlloreda/arrayfire-python
that referenced
this issue
Oct 22, 2018
I was trying to follow the documentation in order to create a sparse matrix of type csr
though i am having this error
I am not sure what is the main cause of the error here; as much as i know i am passing the correct types for all the args. Can anyone provide an example ?
The text was updated successfully, but these errors were encountered: