Re: [Tutor] scaling values

2006-03-14 Thread kevin parks
Thanks to Kent Johnson, & David Heiser and everyone else. Looks like i was most of the way there...hehe... David Heiser gets special bonus points for actually understanding my initial mysterious query. ___ Tutor maillist - Tutor@python.org http://mai

Re: [Tutor] scaling values

2006-03-14 Thread Kent Johnson
kevin parks wrote: > hi, > > Seems my post added much confusion. Sorry... I was hoping not to have > to post my code since it is really wrong and slightly embarrassing.. I think the confusion was about what input range to use. From your code it looks like you want to use just the actual range

Re: [Tutor] scaling values

2006-03-14 Thread kevin parks
hi, Seems my post added much confusion. Sorry... I was hoping not to have to post my code since it is really wrong and slightly embarrassing.. what i am trying to do is map an input range of values to output range. I was hoping to make it a bit of an all purpose utility that would map pretty m

Re: [Tutor] scaling values

2006-03-14 Thread Hugo González Monteverde
Hi Kevin, Do you mean:? 1)take the highest value in the list hval, take the lowest value in the list lval 2) pass top and bottom NEW values for the list: ntop nbot 3) then build another list where hval is replaced by ntop, lval is replaced by nbot, and everything else is geometrically scaled

Re: [Tutor] scaling values

2006-03-14 Thread David Heiser
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of kevin parks Sent: Tuesday, March 14, 2006 1:03 AM To: tutor@python.org Subject: [Tutor] scaling values i have various functions (that i didn't write) that put out data in lists of various types. But some functions (which i

Re: [Tutor] scaling values

2006-03-14 Thread Bob Gailer
kevin parks wrote: > i have various functions (that i didn't write) that put out data in > lists of various types. But some functions (which i didn't write) that > expect the data to be scaled, sometimes 0-1 sometimes 1-2, sometimes > 0-127..., sometimes 0 - 32768... gosh you name it. In other w

Re: [Tutor] scaling values

2006-03-14 Thread Danny Yoo
On Tue, 14 Mar 2006, kevin parks wrote: > is there a scaling function in python (or numeric or scipy) that can > scale a list of values to a high precision? > > x = [13, 71, 120, 88, 82, 100, 10, 65, 101, 45, 26] > > foo = scale(x, 0, 1.0) Hi Kevin, I'm still confused by the problem. Let's tr

[Tutor] scaling values

2006-03-14 Thread kevin parks
i have various functions (that i didn't write) that put out data in lists of various types. But some functions (which i didn't write) that expect the data to be scaled, sometimes 0-1 sometimes 1-2, sometimes 0-127..., sometimes 0 - 32768... gosh you name it. In other words i have a bunch of bla