[SciPy-User] [SciPy-user] Looping over one variable keeping the others constant

nicky van foreest vanforeest@gmail....
Fri Apr 13 14:15:13 CDT 2012


Hi

Perhaps jou van something useful in the python itertools module. Itertools
product seems to do the job.

Nicky
On Apr 13, 2012 6:06 AM, "surfcast23" <surfcast23@gmail.com> wrote:

>
> Hi All,
>
>  I would like to know how one can loop over one variable incrementing it
> while keeping the second fixed. With the final out put being a table of
> values. For example hold y fixed and increment x then increment y and
> re-increment  x so you would get something like this
>
> x,y
> 1,1
> 2,1
> 3,1
> 1,2
> 2,2
> 3,2
>
> thanks in advance
> --
> View this message in context:
> http://old.nabble.com/Looping-over-one-variable-keeping-the-others-constant-tp33679664p33679664.html
> Sent from the Scipy-User mailing list archive at Nabble.com.
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120413/93743f14/attachment.html 


More information about the SciPy-User mailing list