Lisandro Dalcin, 15.12.2010 20:38: > On 15 December 2010 09:02, Arfrever Frehtes Taifersar Arahesis >> ====================================================================== >> ERROR: compiling (c) and running numpy_bufacc_T155 >> ---------------------------------------------------------------------- >> FAILED (errors=11) >> >> === Got errors: === >> 10:9: 'ndarray' is not a type identifier >> 173:49: "mode" is not a buffer option > > The problem here is that the dictionary keywords of > __cythonbufferdefaults__ are parsed as BytesLiteral, there is code > with "if not mode in buffer_options" at Buffer.py that fails because > "mode" is 'bytes' and "buffer_options" do have 'str' keys... > > Stefan, could you take a look at this?
Yes, I know. IIRC, NumPy 1.4 *requires* bytes values here, though. I don't have any NumPy's installed, BTW, especially not in a Py3 build. I think the right way to parse the dict keys here is as identifiers. I usually do d = dict(a=1, b=5) to get this behaviour. Cython transforms this to a literal dict with identifier keywords internally. Not sure if this works in a .pxd... We could also override the type of the dict keys as identifiers explicitly when handling __cythonbufferdefaults__. Stefan _______________________________________________ Cython-dev mailing list Cython-dev@codespeak.net http://codespeak.net/mailman/listinfo/cython-dev