Re: [Numpy-discussion] Using np.frombuffer and cffi.buffer on array of C structs (problem with struct member padding)

2018-01-30 Thread Joe
Does someone know of a function or a convenient way to automatically derive a dtype object from a C typedef struct string or a cffi.typeof()? Am 27.01.2018 10:30 schrieb Joe: Thanks for your help on this! This solved my issue. Am 25.01.2018 um 19:01 schrieb Allan Haldane: There is a new

Re: [Numpy-discussion] Extending C with Python

2018-01-30 Thread Jialin Liu
Amazing! It works! Thank you Robert. I've been stuck with this many days. Best, Jialin LBNL/NERSC On Tue, Jan 30, 2018 at 10:52 PM, Robert Kern wrote: > On Wed, Jan 31, 2018 at 3:25 PM, Jialin Liu wrote: > >> Hello, >> I'm extending C with python

Re: [Numpy-discussion] Extending C with Python

2018-01-30 Thread Robert Kern
On Wed, Jan 31, 2018 at 3:25 PM, Jialin Liu wrote: > Hello, > I'm extending C with python (which is opposite way of what people usually > do, extending python with C), I'm currently stuck in passing a C array to > python layer, could anyone plz advise? > > I have a C buffer in

[Numpy-discussion] Extending C with Python

2018-01-30 Thread Jialin Liu
Hello, I'm extending C with python (which is opposite way of what people usually do, extending python with C), I'm currently stuck in passing a C array to python layer, could anyone plz advise? I have a C buffer in my C code and want to pass it to a python function. In the C code, I have:

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread Allan Haldane
On 01/30/2018 04:54 PM, josef.p...@gmail.com wrote: > > > On Tue, Jan 30, 2018 at 3:21 PM, Allan Haldane > wrote: > > On 01/30/2018 01:33 PM, josef.p...@gmail.com > wrote: > > AFAICS, one problem

[Numpy-discussion] doc? music through mathematical relations between LPCM samples and musical elements/characteristics

2018-01-30 Thread Renato Fabbri
the half-shape suite: archive.org/details/ShapeSuite was completely synthesized using psychophysical relations for each resulting 16bit 44kHz samples: https://arxiv.org/abs/1412.6853 I am thinking about the ways in which to make the documentation at least to: * mass (music and audio in sample

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread josef . pktd
On Tue, Jan 30, 2018 at 3:21 PM, Allan Haldane wrote: > On 01/30/2018 01:33 PM, josef.p...@gmail.com wrote: > > AFAICS, one problem is that the padded view didn't come with the > > matching down stream usage support, the pack function as mentioned, an > > alternative way

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread josef . pktd
On Tue, Jan 30, 2018 at 2:42 PM, wrote: > > > On Tue, Jan 30, 2018 at 1:33 PM, wrote: > >> >> >> On Tue, Jan 30, 2018 at 12:28 PM, Allan Haldane >> wrote: >> >>> On 01/29/2018 11:50 PM, josef.p...@gmail.com wrote: >>>

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread josef . pktd
On Tue, Jan 30, 2018 at 12:28 PM, Allan Haldane wrote: > On 01/29/2018 11:50 PM, josef.p...@gmail.com wrote: > >> >> >> On Mon, Jan 29, 2018 at 10:44 PM, Allan Haldane > > wrote: >> >> On 01/29/2018 05:59 PM,

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread Allan Haldane
On 01/29/2018 11:50 PM, josef.p...@gmail.com wrote: On Mon, Jan 29, 2018 at 10:44 PM, Allan Haldane > wrote: On 01/29/2018 05:59 PM, josef.p...@gmail.com wrote: On Mon, Jan 29, 2018 at

Re: [Numpy-discussion] Setting custom dtypes and 1.14

2018-01-30 Thread Chris Barker
On Mon, Jan 29, 2018 at 7:44 PM, Allan Haldane wrote: > I suggest that if we want to allow either means over fields, or conversion > of a n-D structured array to an n+1-D regular ndarray, we should add a > dedicated function to do so in numpy.lib.recfunctions > which does