<div dir="ltr">Just did, it works for my test problems, so hope it gets passed ;)</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 21, 2015 at 1:53 PM, Jed Brown <span dir="ltr"><<a href="mailto:jed@jedbrown.org" target="_blank">jed@jedbrown.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Justin Chang <<a href="mailto:jychang48@gmail.com">jychang48@gmail.com</a>> writes:<br>
<br>
> Hi all,<br>
><br>
> I noticed that there's no VecChop in petsc4py. I see a MatChop, but was<br>
> wondering if you guys can add the petsc4py implementation of VecChop.<br>
><br>
> I am guessing it would be something like:<br>
<br>
</span>Since you've done the work, you might as well submit it as a pull<br>
request.<br>
<div class="HOEnZb"><div class="h5"><br>
> in src/PETSc/Vec.pyx:<br>
><br>
> def chop(self, tol):<br>
>   cdef PetscReal rval = asReal(tol)<br>
>   CHKERR( VecChop(self.vec, rval) )<br>
><br>
> in src/PETSc/petscvec.pxi:<br>
><br>
> int VecChop(PetscVec, PetscReal)<br>
><br>
> Thanks,<br>
> Justin<br>
</div></div></blockquote></div><br></div>