Thanks Andreas. You were completely right. Do you think it would make sense to add a method to Image objects that returns the image's dimensions as a numpy.shape object? Since a shape is used to create images now, it seems natural to be able to retrieve shapes from images as well.
Cheers, David 2009/9/14 Andreas Klöckner <[email protected]> > On Montag 14 September 2009, David Garcia wrote: > > Hi Andreas & folks, > > I just downloaded and installed pyopencl 0.91 to try the changes. The > code > > looks cleaner now that we have constructors. Thanks a lot :) > > > > However, when I tried executing the code below I get an error: > > >>> ctx = cl.create_context_from_type(cl.device_type.CPU)>>> ctx.DEVICES > > Short version: Use ctx.devices intead--the docs specify lowercase for .info > attributes, to match PEP8. > > Long version: Ah. Nice. Side effect of a performance optimization. > Previously, > the .info lookup feature would transform the string to upper case and look > it > up in the appropriate scope. Now it uses a lookup table of pre-intern()ed > strings, which should be an estimated bajillion times faster. Side effect: > You > can't do ctx.DEVICES (or ctx.DeViCeS, for that matter) any more. > > Andreas > > _______________________________________________ > PyOpenCL mailing list > [email protected] > http://tiker.net/mailman/listinfo/pyopencl_tiker.net > >
_______________________________________________ PyOpenCL mailing list [email protected] http://tiker.net/mailman/listinfo/pyopencl_tiker.net
