[Numpy-discussion] Creating a RGB-image from BW

Johannes Bauer dfnsonfsduifb@gmx...
Wed Apr 29 10:55:41 CDT 2009


Hi Zach,

Zachary Pincus schrieb:

> According to http://www.pygtk.org/pygtk2reference/class- 
> gdkpixbuf.html , the pixels_array is a numeric python array (a  
> predecessor to numpy). The upshot is that perhaps the nice  
> broadcasting machinery will work fine:
> 
> pb_pixels[...] = fits_pixels[..., numpy.newaxis]

Ayyyyyyyyyyyyyyyy! *jump*

That does what I want so fast that my current implementation can't even
measure it. You're a genius!

Thanks so much!

Kind regards,
Johannes


More information about the Numpy-discussion mailing list