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

surfcast23 surfcast23 at gmail.com
Sun Apr 15 18:44:52 EDT 2012


I looked through itertools in the documentation  but did not find anything. I
will see if I can adapt the other suggestions.

surfcast23 wrote:
> 
> Thanks for every ones replies. I'm sorry I am just replying I was out of
> town for a few days. I will look into everyones suggestions. The main
> thing is that I need a function that can use equations such as
> 
> x[i]= const+x
>        x+=const
> y[i]= const+y
>        y+=const
> 
> So that x and y increment by whatever the constant is and that new value
> is what is used to get the next array element.
>       
> 
> 
> surfcast23 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-tp33679664p33688997.html
Sent from the Scipy-User mailing list archive at Nabble.com.




More information about the SciPy-User mailing list