On Thu, 21 Aug 2008 10:40:47 -0700 (PDT)
Prashant Saxena <[EMAIL PROTECTED]> wrote:
> Hi,
>
> numpy rocks!!!
>
> import numpy
> linsp = numpy.linspace
> red = linsp(0, 255, 50)
> green = linsp(125, 150, 50)
> blue = linsp(175, 255, 50)
>
> array's elements are float. How do I convert them into
> import numpy
> linsp = numpy.linspace
> red = linsp(0, 255, 50)
> green = linsp(125, 150, 50)
> blue = linsp(175, 255, 50)
>
> array's elements are float. How do I convert them into integer?
>
> I need to build a new array from red, green, blue. like this:
>
> [[ red[0], green[0], blue[0] ],
> [
On Thursday 21 August 2008 13:40:47 Prashant Saxena wrote:
> Hi,
>
> numpy rocks!!!
>
> import numpy
> linsp = numpy.linspace
> red = linsp(0, 255, 50)
> green = linsp(125, 150, 50)
> blue = linsp(175, 255, 50)
>
> array's elements are float. How do I convert them into integer?
Use .astype(int)
r
On Thu, Aug 21, 2008 at 10:40 AM, Prashant Saxena <[EMAIL PROTECTED]> wrote:
> Hi,
>
> numpy rocks!!!
>
> import numpy
> linsp = numpy.linspace
> red = linsp(0, 255, 50)
> green = linsp(125, 150, 50)
> blue = linsp(175, 255, 50)
>
> array's elements are float. How do I convert them into integer?
>
Hi,
numpy rocks!!!
import numpy
linsp = numpy.linspace
red = linsp(0, 255, 50)
green = linsp(125, 150, 50)
blue = linsp(175, 255, 50)
array's elements are float. How do I convert them into integer?
I need to build a new array from red, green, blue. like this:
[[ red[0], green[0], blue[0] ],
[