Re: English Idiom in Unix: Directory Recursively

2011-05-18 Thread Victor Eijkhout
Harrison Hill wrote: > No need - I have the Dictionary definition of recursion here: > > Recursion: (N). See recursion. If you tell a joke, you have to tell it right. Recursion: (N). See recursion. See also tail recursion. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu

Re: I don't understand generator.send()

2011-05-14 Thread Victor Eijkhout
sent is not None: > yield None # This becomes the return value from gen.send() > yield sent # This is the next value yielded >i += 1 I think this will serve my purposes. Thanks everyone for broadening my understanding of generators. Victor. -- Victor

I don't understand generator.send()

2011-05-14 Thread Victor Eijkhout
n? In my code I was hoping to get 0,1,2,3,4,5,2,6,7 as yield expressions. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: Generator question

2010-12-22 Thread Victor Eijkhout
Dan Stromberg wrote: > You likely want a class variable: Sounds like an elegant solution. Thanks! Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Generator question

2010-12-22 Thread Victor Eijkhout
ppreciated. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: MATLAB to Python?

2010-11-27 Thread Victor Eijkhout
thods. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: Python -- floating point arithmetic

2010-07-08 Thread Victor Eijkhout
Zooko O'Whielacronx wrote: > I'm starting to think that one should use Decimals by default and > reserve floats for special cases. Only if one has Power6 (or 7) which has hardware support for BCD. Otherwise you will have slow applications. Victor. -- Victor Eijkhout --

Re: long int computations

2010-05-04 Thread Victor Eijkhout
2. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: long int computations

2010-05-03 Thread Victor Eijkhout
Jerry Hill wrote: > >>> from __future__ import division > >>> long1/long2 > 0.5 Beautiful. Thanks so much guys. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

long int computations

2010-05-03 Thread Victor Eijkhout
I have two long ints, both too long to convert to float, but their ratio is something reasonable. How can I compute that? The obvious "(1.*x)/y" does not work. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: sort array, apply rearrangement to second

2010-03-31 Thread Victor Eijkhout
Robert Kern wrote: > second[first.argsort()] Really cool. Thanks. > Ask numpy questions on the numpy mailing list. I will. I thought that this question would have an answer in a generic python idiom. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.pyth

sort array, apply rearrangement to second

2010-03-30 Thread Victor Eijkhout
this needs to be done as efficiently as possible. I could use a hand. Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list

Re: scipy sparse matrix question

2010-03-09 Thread Victor Eijkhout
Terry Reedy wrote: > > My specific question: what does "for x in A" give me when A is a sparse > > matrix? > > Try it and see what you get. Ah, how do I see what I get? If I print it it looks plausible, but I don't know how to pull it apart. It doesn't see

scipy sparse matrix question

2010-03-08 Thread Victor Eijkhout
from x? Victor. -- Victor Eijkhout -- eijkhout at tacc utexas edu -- http://mail.python.org/mailman/listinfo/python-list