<div dir="ltr"><div dir="ltr">On Mon, Aug 17, 2020 at 12:22 AM Nidish <<a href="mailto:nb25@rice.edu">nb25@rice.edu</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Hello,</p>
<p>I'm presently using the following to convert scipy.sparse csr
matrices to petsc.<br>
</p>
<blockquote>
<p>pM = PETSc.Mat().createAIJ(size=M.shape, csr =(M.indptr,
M.indices, M.data))</p>
</blockquote>
<p>This however doesn't seem to work when M is rectangular. For this
case I have to do <br>
</p>
<blockquote>
<p>pM = PETSc.Mat().createAIJ(size=M.T.shape, csr =(M.indptr,
M.indices, M.data))</p>
</blockquote>
<div>i.e., I need to use the shape of the
transpose of the matrix. <br>
</div>
<div><br>
</div>
<div>Does this have something to do with the
way the csr format is interpreted in the petsc4py wrappings or in
PETSc itself?</div></div></blockquote><div><br></div><div>No. It sounds like something in scipy. These are just the number of rows and columns.</div><div><br></div><div> Thanks,</div><div><br></div><div> Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div>-- <br>
Nidish</div>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div><div><br></div><div><a href="http://www.cse.buffalo.edu/~knepley/" target="_blank">https://www.cse.buffalo.edu/~knepley/</a><br></div></div></div></div></div></div></div></div>