Re: [Numpy-discussion] Multidimension array access in C via Python API

2016-04-05 Thread Stefan Seefeld
On 05.04.2016 13:24, Antoine Pitrou wrote: > On Tue, 5 Apr 2016 08:39:39 -0700 (MST) > mpc wrote: >> This is the reason I'm doing this in the first place, because I made a pure >> python version but it runs really slow for larger data sets, so I'm >> basically rewriting the same function but using

[Numpy-discussion] querying backend information

2015-11-04 Thread Stefan Seefeld
Hello, is there a way to query Numpy for information about backends (BLAS, LAPACK, etc.) that it was compiled against, including compiler / linker flags that were used ? Consider the use-case where instead of calling a function such as numpy.dot() I may want to call the appropriate backend directl

Re: [Numpy-discussion] Best way to expose std::vector to be used with numpy

2014-10-14 Thread Stefan Seefeld
On Oct 14, 2014 4:40 AM, "Charles R Harris" wrote: > > > > On Mon, Oct 13, 2014 at 12:54 PM, Sebastian Berg < sebast...@sipsolutions.net> wrote: >> >> On Mo, 2014-10-13 at 13:35 +0200, Daniele Nicolodi wrote: >> > Hello, >> > >> > I have a C++ application that collects float, int or complex data i

Re: [Numpy-discussion] NumPy C API question

2014-05-22 Thread Stefan Seefeld
o small scopes, as within those scopes the underlying memory is pinned, and no operation that would involve a relocation of the data (such as OpenCL kernels) may be called. Not following such rules may result in deadlocks... I think I like that approach. Explicit is better than implicit. :-) T

Re: [Numpy-discussion] NumPy C API question

2014-05-21 Thread Stefan Seefeld
Hi Nathaniel, thanks for the prompt and thorough answer. You are entirely right, I hadn't thought things through properly, so let me back up a bit. I want to provide Python bindings to a C++ library I'm writing, which is based on vector/matrix/tensor data types. In my naive view I would expose th

[Numpy-discussion] NumPy C API question

2014-05-21 Thread Stefan Seefeld
Hello, I would like to expose an existing (C++) object as a NumPy array to Python. Right now I'm using PyArray_New, passing the pointer to my object's storage. It now happens that the storage point of my object may change over its lifetime, so I'd like to change the pointer that is used in the PyA

Re: [Numpy-discussion] allocated memory cache for numpy

2014-02-17 Thread Stefan Seefeld
On 02/17/2014 06:56 PM, Nathaniel Smith wrote: > On Mon, Feb 17, 2014 at 3:55 PM, Stefan Seefeld wrote: >> On 02/17/2014 03:42 PM, Nathaniel Smith wrote: >>> Another optimization we should consider that might help a lot in the >>> same situations where this would hel

Re: [Numpy-discussion] allocated memory cache for numpy

2014-02-17 Thread Stefan Seefeld
On 02/17/2014 03:42 PM, Nathaniel Smith wrote: > Another optimization we should consider that might help a lot in the > same situations where this would help: for code called from the > cpython eval loop, it's afaict possible to determine which inputs are > temporaries by checking their refcnt. In

Re: [Numpy-discussion] HOWTO build NumPy without external math libs

2010-07-13 Thread Stefan Seefeld
On 07/13/2010 04:05 PM, Christopher Barker wrote: > Robert Kern wrote: > >>> I don't believe that there are any such options, but is there a particular >>> reason why you *don't* want to use such external libs if you have them? I >>> don't think anyone has considered a use-case where one would

[Numpy-discussion] HOWTO build NumPy without external math libs

2010-07-10 Thread Stefan Seefeld
Hello, the NumPy docs (at http://docs.scipy.org/doc/numpy/user/install.html) suggest that NumPy doesn't require external linear algebra libraries (such as ATLAS). How can I compiler NumPy without using them, even if they are detected ? Are there any undocumented options I can pass to setup.py