[Numpy-discussion] first post, simple questions

Prashant Saxena animator333@yahoo....
Thu Aug 21 12:40:47 CDT 2008


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] ],
 [ red[1], green[1], blue[1] ],
 [ red[2], green[3], blue[3] ],
 ....
 ....
 [ red[49], green[49], blue[49] ],
]

how do I create such an array?

Are there any issues regarding compilation of simple python scripts using numpy functions and cython?

Thanks



      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080821/bbbb6462/attachment.html 


More information about the Numpy-discussion mailing list