Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-08-31 Thread Jason Newton
riksen > > > On Wed, Aug 31, 2016 at 12:20 PM Jason Newton <nev...@gmail.com> wrote: > >> I just wanted to follow up on the C++ side of OP email - Cython has quite >> a few difficulties working with C++ code at the moment. It's really more >> of a C solutio

Re: [Numpy-discussion] State-of-the-art to use a C/C++ library from Python

2016-08-31 Thread Jason Newton
I just wanted to follow up on the C++ side of OP email - Cython has quite a few difficulties working with C++ code at the moment. It's really more of a C solution most of the time and you must split things up into a mostly C call interface (that is the C code Cython can call) and limit

Re: [Numpy-discussion] deterministic, reproducible matmul / __matmult_

2016-07-18 Thread Jason Newton
On Mon, Jul 11, 2016 at 3:27 PM, Pauli Virtanen <p...@iki.fi> wrote: > Mon, 11 Jul 2016 13:01:49 -0400, Jason Newton kirjoitti: >> Does the ML have any ideas on how one could get a matmul that will not >> allow any funny business on the evaluation of the products? F

[Numpy-discussion] deterministic, reproducible matmul / __matmult_

2016-07-11 Thread Jason Newton
Hello I'm a long time user of numpy - but an issue I've had with it is making sure I can reproduce the results of a floating point matrix multiplication in other languages/modules (like c or GPU) in another, or across installations. I take great pains in doing this type of work because it

[Numpy-discussion] correct sizeof for ndarray

2015-10-19 Thread Jason Newton
Hi folks, I noticed an unexpected behavior of itemsize for structures with offsets that are larger than that of a packed structure in memory. This matters when parsing in memory structures from C and some others (recently and HDF5/h5py detail got me for a bit). So what is the correct way to get

Re: [Numpy-discussion] Python needs goto

2015-09-24 Thread Jason Newton
In my experience, it's also come up with finite-state-machines where there's lots of loops. You might consider something like a long-lived client-loop on some socket, where states like try-connect, connected, and while-connected-and-everythings-ok exist and each can have it's own never ending

Re: [Numpy-discussion] Change default order to Fortran order

2015-08-02 Thread Jason Newton
Just chiming in with my 2 cents, in direct response to your points... - Image oriented processing is most typically done with row-major storage layout. From hardware to general software implementations. - Well really think of it as [slice,] row, column (logical)... you don't actually

Re: [Numpy-discussion] Proposal: Deprecate np.int, np.float, etc.?

2015-07-31 Thread Jason Newton
On Fri, Jul 31, 2015 at 5:19 PM, Nick Papior nickpap...@gmail.com wrote: -- Kind regards Nick Papior On 31 Jul 2015 17:53, Chris Barker chris.bar...@noaa.gov wrote: On Thu, Jul 30, 2015 at 11:24 PM, Jason Newton nev...@gmail.com wrote: This really needs changing though. scientific

Re: [Numpy-discussion] Proposal: Deprecate np.int, np.float, etc.?

2015-07-31 Thread Jason Newton
Been using numpy in it's various forms since like 2005. burned on int, int_ just today with boost.python / ndarray conversions and a number of times before that. intc being C's int!? Didn't even know it existed till today. This isn't the first time, esp with float. Bool is actually expected

Re: [Numpy-discussion] constructing record dtypes from the c-api

2015-07-24 Thread Jason Newton
. I plan on building a helper class to generate the dictionaries for this subroutine since something akin to the list dtype specification is more user-friendly (even towards me). -Jason On Thu, Jul 23, 2015 at 7:55 PM, Jason Newton nev...@gmail.com wrote: Hi folks, The moderator for the ML

[Numpy-discussion] constructing record dtypes from the c-api

2015-07-23 Thread Jason Newton
Hi folks, The moderator for the ML approved my subscription so I can now post this back in the numpy list rather than scipy. Apologies for the duplicate/cross posting. I was trying to figure out how to make a dtype for a c-struct on the c-side and storing that in some boost python libraries