We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cpg_csc
The definition of cpg_csc is:
// Compressed sparse column matrix typedef struct { cpg_int nzmax; cpg_int n; cpg_int m; cpg_int *p; cpg_int *i; cpg_float *x; cpg_int nz; } cpg_csc;
Note that n comes before m. When matrices are defined, the code is:
n
m
def write_mat_def(f, mat, name): """ Write sparse matrix (scipy compressed sparse column) to file """ write_vec_def(f, mat['i'], name + '_i', 'cpg_int') write_vec_def(f, mat['p'], name + '_p', 'cpg_int') write_vec_def(f, mat['x'], name + '_x', 'cpg_float') f.write(f'cpg_csc {name} = {{') f.write(f'{mat["nzmax"]}, ') f.write(f'{mat["m"]}, ') f.write(f'{mat["n"]}, ') f.write(f'{name}_p, ') f.write(f'{name}_i, ') f.write(f'{name}_x, ') f.write(f'{mat["nz"]}}};\n')
note that n and m are switched.
I think the reason that this works is that n and m are never used. Is that correct?
The text was updated successfully, but these errors were encountered:
Thanks for pointing this out. Indeed, nzmax, n, m are not used. Fixed with #37
nzmax
Sorry, something went wrong.
No branches or pull requests
The definition of
cpg_csc
is:Note that
n
comes beforem
. When matrices are defined, the code is:note that
n
andm
are switched.I think the reason that this works is that
n
andm
are never used. Is that correct?The text was updated successfully, but these errors were encountered: