On Sep 24, 2011 2:59 PM, "Chris Angelico" <ros...@gmail.com> wrote:
>
> On Sat, Sep 24, 2011 at 11:53 PM, Steven D'Aprano
> <steve+comp.lang.pyt...@pearwood.info> wrote:
> > #1 add multiples of the width to the starting value, 0.
> >
> > #2 subtract multiples of width from the ending value, 2.1.
>
> #3, go half and half - generate the lower half by adding to the lower
> bound, and the upper half by subtracting from the upper bound. Not

#4 the barycentric approach.

    ((n-i)*a + i*b)/n for i in range(n+1)

Gives you n+1 equally spaced values between a and b inclusive

Arnaud
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to