[Cython] missing cimport in module '.' - bug?

2016-05-04 Thread Christoph Groth
Hello, The setup.py script of our package "kwant" uses Cython.Build.cythonize. Everything works well, except that for pyx files that cimport a module from "." an error message is generated. E.g. for the file "kwant/linalg/lapack.pyx" that contains the line from . cimport f_lapack The following

Re: [Cython] import relative cimport

2012-10-01 Thread Christoph Groth
Oh, something I forgot: in Cython/Compiler/Parsing.py I find code that emits "Relative cimport is not supported yet". However, when I try to compile code which includes a relative cimport, I do not get this error, but instead from .graph.defs cimport gint ^ --

[Cython] import relative cimport

2012-10-01 Thread Christoph Groth
Hello, I believe that relative cimports would be useful in Cython. (For a motivation, see my recent posting on cython-user http://thread.gmane.org/gmane.comp.python.cython.user/7401) So I tried to assess how much work it would be to implement that feature, but that's a tough job as I do not have

Re: [Cython] read-only memory views

2012-09-19 Thread Christoph Groth
Robert Bradshaw writes: > Coincidentally, I actually implemented rudimentary const support a > couple of days ago. It's not perfect, but at least it allows you to > provide the correct declarations to deal with const polluted^H^H^H^H > correct code (including const c++ class methods, for which th

Re: [Cython] [PATCH] make memoryviews work when strides is NULL (unfinished)

2012-09-19 Thread Christoph Groth
Hi Mark, > Thanks for the patch, it looks fine to me. If you want, you could make > a pull request and I'll merge it. Ok, the pull request is here: https://github.com/cython/cython/pull/150 Please double-check that the dereferencing of buf->strides in PyErr_SetString(PyExc_ValueError is still sa

[Cython] read-only memory views

2012-09-18 Thread Christoph Groth
Hello, I have written a python extension module, tinyarray, (to be made public soon) which implements an important subset of numpy optimized for _small_ arrays. Tinyarrays are immutable, which makes them usable as dictionary keys. Some important operations, i.e. creation of a small array from a

[Cython] [PATCH] make memoryviews work when strides is NULL (unfinished)

2012-09-18 Thread Christoph Groth
Hi, Thanks a lot for the recently added generic memoryview support, it's just what we needed to optimize an important part of our program. However, I believe that there's a problem with Cython's support for objects which do not provide "strides" information (because they are C-contiguous). The b