<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<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 class="moz-signature">i.e., I need to use the shape of the
transpose of the matrix. <br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">Does this have something to do with the
way the csr format is interpreted in the petsc4py wrappings or in
PETSc itself?<br>
</div>
<div class="moz-signature"><br>
</div>
<div class="moz-signature">-- <br>
Nidish</div>
</body>
</html>