[petsc-users] [petsc4py] dm/examples/tutorials/ex2 in python

Jed Brown jed at jedbrown.org
Tue Jun 2 11:49:29 CDT 2015

Matthew Knepley <knepley at gmail.com> writes:
>> for i in xrange(start,end):
>>         global_vec[i] = 5.0*rank
> No, you would need xrange(end-start):

Specifically, Python made a decision about indexing semantics that,
while not irrational, really sucks for distributed array computing.  I'm
not aware of a clean way to give you nice syntax.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150602/ba457616/attachment.pgp>

More information about the petsc-users mailing list