[Cython] Broken C++ compile test
Hi, the question by Czarek Tomczak on the users list made me stumble into this old C++ test: https://github.com/cython/cython/blob/master/tests/compile/cpp_operators.pyx It's completely broken and only failed to fail because it was never executed. Apparently, the test runner shadowed it with the test of the same name in the tests/run/ directory. Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Broken C++ compile test
Stefan Behnel, 07.12.2012 09:13: > the question by Czarek Tomczak on the users list made me stumble into this > old C++ test: > > https://github.com/cython/cython/blob/master/tests/compile/cpp_operators.pyx > > It's completely broken and only failed to fail because it was never > executed. Apparently, the test runner shadowed it with the test of the same > name in the tests/run/ directory. Hmm, sorry. It's not shadowed, it's just disabled in bugs.txt. Still, I wonder if this test actually makes sense - do we want to support this kind of syntax for C++ classes, or can this test just die? Stefan ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
[Cython] change strides attribute
Hey, The current numpy contiguous flags are relatively restrictive. This means that for example an array of `shape == (1,3,1)` and `itemsize == 1` is C-Contiguous if `strides == (3,1,1)` and F-Contiguous if `strides == (1,1,3)`. It would simplify flags settings and avoid copies here and there and generally be what most seem to expect to ignore the `strides[i]` if `shape[i] == 1` (or all if the array has 0 size). Which means that for example `strides == (0,1,-32)` (so arbitrary but `strides[1]`) would be both C- and F-contiguous. However trying to change this, runs into problems with user code relying on `strides[-1] == itemsize` (C-Contiguous) or `strides[0] == itemsize` (F-Contiguous). But there seems to be no way to really deprecate or protect Cython generated C-Code against such a change, because even if the contiguous buffer requested by Cython has nice strides, a user writing `arr.strides` accesses the original array which may not have and there is no way to give compile time warnings by deprecating flags. So I was wondering (I don't know cython that well) if `arr.strides` could not use `buffer.strides` internally to allow redefinition of contiguous flags in numpy in some future without breaking existing Cython user code. Maybe it is not worth it to go through much trouble for these flags but it seems nicer to me for code simplicity and just generally to be more consistent to redefine them at some point. Regards, Sebastian ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel
Re: [Cython] Broken C++ compile test
On Fri, Dec 7, 2012 at 12:48 AM, Stefan Behnel wrote: > Stefan Behnel, 07.12.2012 09:13: >> the question by Czarek Tomczak on the users list made me stumble into this >> old C++ test: >> >> https://github.com/cython/cython/blob/master/tests/compile/cpp_operators.pyx >> >> It's completely broken and only failed to fail because it was never >> executed. Apparently, the test runner shadowed it with the test of the same >> name in the tests/run/ directory. > > Hmm, sorry. It's not shadowed, it's just disabled in bugs.txt. > > Still, I wonder if this test actually makes sense - do we want to support > this kind of syntax for C++ classes, or can this test just die? It looks like it's from way back in the day before we had even come to a final decision on syntax. I've nuked it. - Robert ___ cython-devel mailing list cython-devel@python.org http://mail.python.org/mailman/listinfo/cython-devel