Wow, numpy really is different! (Porting doesn't go quite as well as hoped...)


Down at Linux Caffe. First little project of the day was getting OpenGL-ctypes running on the laptop again. Turns out most of the problems seem to be with the PyGame install getting corrupted, so started working on making it possible to use numpy for OpenGLContext.

Seems the API regarding types has been altered. Particularly the typecode() has been removed and is now the complex description of the type. A few other things needing surgery in there too. Haven't figured out an elegant way to check for "are you already a native-float representation" other than creating one of those and checking against the __array_typestr__

Anyway, doesn't seem too likely that I'll get it all finished today.

[Update: and darn it all, when I ask if an array is true, I mean does it have a length! Same as all other sequences of note. Argh, and where did the iscontinugous() check go?]

Comments

  1. Florian

    Florian on 06/18/2006 2:39 a.m. #


    Hi,<br />
    <br />
    tried getting OpengGL-ctypes yesterday to run unbuntu dapper.<br />
    <br />
    for 2.4 I gave up when it complained about OpenGLContext missing.<br />
    for 2.5 I gave up when the examples required pygame.<br />
    <br />
    Few sidenotes:<br />
    * would be nice if that was an egg enabled package, so "python setupy.py develop" as well as "python setupy.py bdist_egg" would work.<br />
    * a svn repository missed dearly<br />
    * a Trac missed equally dearly<br />
    <br />
    Originally I intended giving 2.5 together with Opengl a spin at writing some fun stuff, however due to those difficulties I now go back to 2.4 with apt pygame+opengl.

  2. Filip

    Filip on 06/20/2006 7:30 a.m. #


    You may find the following resources useful when converting from Numeric:<br />
    http://www.scipy.org/Converting_from_Numeric<br />
    http://projects.scipy.org/scipy/numpy/browser/trunk/numpy/lib/convertcode.py<br />
    <br />
    and .iscontiguous() is .flags.contiguous now

Comments are closed.

Pingbacks

Pingbacks are closed.