convert triply-nested array to void pointer using ctypes

2016-08-24 Thread sth
I'd like to send an array containing arrays of 2-element float arrays to a foreign function, as the following struct: class _FFIArray(Structure): _fields_ = [("data", c_void_p), ("len", c_size_t)] @classmethod def from_param(cls, seq): """ Allow implicit conv

Re: NumPy frombuffer giving nonsense values when reading C float array on Windows

2016-07-26 Thread sth
On Tuesday, 26 July 2016 19:10:46 UTC+1, eryk sun wrote: > On Tue, Jul 26, 2016 at 12:06 PM, sth wrote: > > I'm using ctypes to interface with a binary which returns a void pointer > > (ctypes c_void_p) to a nested 64-bit float array: > > If this comes from a functi

Re: NumPy frombuffer giving nonsense values when reading C float array on Windows

2016-07-26 Thread sth
On Tuesday, 26 July 2016 16:36:33 UTC+1, Christian Gollwitzer wrote: > Am 26.07.16 um 17:09 schrieb sth: > > it's difficult to test a .dylib / .so using valgrind > > Why is it difficult? If you have a python script such that > > python mytests.py > >

Re: NumPy frombuffer giving nonsense values when reading C float array on Windows

2016-07-26 Thread sth
On Tuesday, 26 July 2016 15:21:14 UTC+1, Peter Otten wrote: > > > I'm using ctypes to interface with a binary which returns a void pointer > > (ctypes c_void_p) to a nested 64-bit float array: > > [[1.0, 2.0], [3.0, 4.0], … ] > > then return the pointer so it can be freed > > > > I'm using the f

need help removing 'dev-r0' part from a python package

2015-04-19 Thread sth . srn
My package 'webpreview'[https://github.com/ludbek/webpreview] has new version '1.0.3'. I used 'sdist' to bundle it. Unfortunately it names it 'webpreview-1.0.3dev-r0.tar.gz' instead of 'webpreview-1.0.3.tar.gz' making it unsuitable to upload to pypi. What is causing sdist to append 'dev' stuff