PythonOptimizers / cysparse

Python/Cython library to replace PySparse
http://PythonOptimizers.github.io/cysparse
7 stars 3 forks source link

LLSparseMatrixView for type COMPLEX256_T does not work... #213

Open ghost opened 8 years ago

ghost commented 8 years ago

This code does not work:

from cysparse.sparse.ll_mat import *
from cysparse.common_types.cysparse_types import *

import sys

nrow = 2
ncol = 3
A = LinearFillLLSparseMatrix(nrow=nrow, ncol=ncol, dtype=COMPLEX256_T, itype=INT32_T)

C = A[:,:]

for i in xrange(nrow):
    for j in xrange(ncol):
        print A[i, j]
        print C[i,j]

However, replace COMPLEX256_T by any other type, it does work...

Related to #190 ?

ghost commented 8 years ago

Yes, this is related to #190

Maybe about time to fix it?

ghost commented 8 years ago

Comparing pyx files generated for COMPLEX256_T and COMPLEX128_T, I don't see any difference... (there are some differences in methodsvalues(), items() and _norm_one() but this is completely normal).

ghost commented 8 years ago

Comparing both C files... There are important differences...

ghost commented 8 years ago

The is really a good nice bug. I can not spend too much time on it right now. As from 22nd of December, COMPLEX258_T is no longer supported. I'll dedicate some time later to work specifically on this, probably with the Cython team.