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 try small examples. Let's say we had this: ########################## x = [13] scaledX = scale(x, 0, 1.0) ########################## What would 'scaledX' have? I'm asking because I have no clue from the problem description! *grin* (There's some hidden knowledge that you have about the problem, so I'm trying to make sure it's out in the open.) We can ask the same question with a slightly larger (but still small) example: x = [13, 71] What should we expect from things like: scale(x, 0.0, 1.0) scale(x, 0.0, 2.0) scale(x, 1.0, 2.0) The results of small examples will help clarify what we'd need to do to make scale() work. Good luck to you! _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor