Comments (2)
Comment by mark on 11 Dec 2011 19:20 UTC
Fixed in 56b88ec4de208be0e327c218893519963273cb1c by Pauli.
from issues-import-test.
Modified by mark on 11 Dec 2011 19:20 UTC
Set description to
From ML. The breakage is due to upgrading to NumPy 1.6.
Upon upgrading to Ubuntu Oneiric (with Cython 1.14.1), I was extremely
disappointed when I found that my data analysis tools would refuse to
run. In particular, numpy array creation of some dtypes would fail with
the perplexing error,
Traceback (most recent call last):
File "photon_tools/test.py", line 4, in <module>
b = bp.bin_photons(a[1)
File "bin_photons.pyx", line 21, in photon_tools.bin_photons.bin_photons (photon_tools/bin_photons.c:1179)
cdef np.ndarray[Bin]('t'],) chunk
ValueError: Buffer packing mode currently only allowed at beginning of format string (this is a defect)
This, despite the fact that I have not specified any explicit packing
modes in my dtypes. I am also able to reproduce this with the latest
Cython release. Strangely enough, a similar datatype had no such
issue. While allocations of the type strobe_event_dtype,
cdef packed struct StrobeEvent:
np.uint64_t time
np.uint8_t channels
strobe_event_dtype = np.dtype([np.uint64), ('chs', np.uint8)](('t',))
succeed, allocations of type bin_dtype,
cdef packed struct Bin:
np.uint64_t start_t
np.uint16_t count
bin_dtype = np.dtype([np.uint64), ('count', np.uint16)](('start_t',))
consistently fail with the above error. Looking at the resulting dtype
objects, the only difference I can see is the type of the 'chs' field is
translated into '|u1' whereas 'count' is translated into '<u2'. Perhaps
this '<' modifier is the cause of the failure.
It seems to me that my code is quite idiomatic, yet I've seen no other
reports of this failure. What am I doing wrong?
from issues-import-test.
Related Issues (20)
- Allow lambda with C functions HOT 3
- Read Cython type declarations from PEP 3107 function annotations
- ScopedExprNode doesn't support closures
- data of numpy masked array is not around
- Errors in circular imports
- Propagate length hint through generator expressions HOT 1
- Comprehension parsing bug HOT 1
- Allow lambda with C functions HOT 3
- Read Cython type declarations from PEP 3107 function annotations
- ScopedExprNode doesn't support closures
- data of numpy masked array is not around
- Errors in circular imports
- Propagate length hint through generator expressions HOT 1
- Comprehension parsing bug HOT 1
- Py2 syntax for looping over implicit tuple not supported HOT 2
- Cython and NumPy record dtypes breaks with NumPy 1.6 HOT 2
- Py2 syntax for looping over implicit tuple not supported HOT 2
- Runtime Compilation of a module [patch] HOT 2
- Propagate length hint through generator expressions HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from issues-import-test.