[petsc-users] converting scipy sparse CSR matrix to petcs matrix with mpi
Jed Brown
jedbrown at mcs.anl.gov
Thu Aug 29 07:56:21 CDT 2013
John Travers <jtravs at gmail.com> writes:
> On 28 Aug 2013, at 14:58, Jed Brown <jedbrown at mcs.anl.gov> wrote:
>> csr=(A.indptr[rstart:rend] - A.indptr[rstart],
>> A.indices[A.indptr[rstart]:A.indptr[rend]],
>> A.data[A.indptr[rstart]:A.indptr[rend]])
>>
>
> Thanks, this works (except it should be A.indptr[rstart:rend+1] in the
> first line I think).
Yes, good catch.
> Well, not in the long run, but at the moment that code is debugged and
> working and I only wanted to try the slepc solvers first.
Great, let us know if you have any problems.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20130829/15940771/attachment.pgp>
More information about the petsc-users
mailing list