Bill Spotz wrote:
> On Feb 4, 2008, at 1:05 PM, Christopher Barker wrote:
>
>> Boost::python -- best for writing custom extensions in C++ -- also can
>> be used for interfacing with legacy C++. There were boost array
>> classes
>> for numpy -- are these being maintained?
>
> There are boo
For comparison of ctypes and SWIG wrappers of a simple C++ codebase,
feel free to take a look at the code for scikits.ann
(http://scipy.org/scipy/scikits/wiki/AnnWrapper). The original wrapper
was written using SWIG and the numpy typemaps. Rob Hetland has coded
an almost-the-same API wrapper using
On Feb 4, 2008 5:13 AM, David Cournapeau <[EMAIL PROTECTED]> wrote:
> Hi,
>
> While studying a bit nsis (an open source system to build windows
> installers), I realized that it would be good if we could detect the
> target CPU and install the right numpy accordingly. I have coded a
> nsis plugin
On Mon, Feb 04, 2008 at 12:49:58PM -0800, Lou Pecora wrote:
> So, for those looking for speed up through some
> external C or C++ code, I would say (trying to be fair
> here), try what Chris recommends below, if you want,
> but IMHO, none of it is trivial. If you get it to
> work, great. If not,
Stuart Brorson wrote:
>
> Anyway, since NumPy is committed to (Re, Im) as the base
> representation of complex numbers, then it is not unreasonable to
> implement round, fix, and so on, by operating independently on the Re
> and Im parts.
>
> Or am I wrong?
>
Sounds reasonable to me...
-Travis
--- Christopher Barker <[EMAIL PROTECTED]> wrote:
> Lou Pecora wrote:
> > I
> > would recommend using the C API
>
> I would recommend against this -- there is a lot of
> code to write in
> extensions to make sure you do reference counting,
> etc, and it is hard
> to get right.
Well, fair enou
On Mon, Feb 04, 2008 at 12:05:45PM -0800, Christopher Barker wrote:
> ctypes -- [...] Can it call C++ directly at all?
No, but you can use 'extern "C"' in you cpp file, if you have controle
over the file.
Gaël
___
Numpy-discussion mailing list
Numpy-dis
Christopher Barker wrote:
> Neal Becker wrote:
>> I have a variety of experiments that I put in this mercurial repo:
>> https://nbecker.dyndns.org/hg/
>>
>> The primary aim of this is to reuse c++ code written to a generic
>> container interface, with numpy.
>
> Neal,
>
> I'd love to hear more
On Feb 4, 2008, at 1:05 PM, Christopher Barker wrote:
> Boost::python -- best for writing custom extensions in C++ -- also can
> be used for interfacing with legacy C++. There were boost array
> classes
> for numpy -- are these being maintained?
There are boost array classes for Numeric, and *t
Neal Becker wrote:
> I have a variety of experiments that I put in this mercurial repo:
> https://nbecker.dyndns.org/hg/
>
> The primary aim of this is to reuse c++ code written to a generic container
> interface, with numpy.
Neal,
I'd love to hear more about this. Do you have a two paragraph
d
Lou Pecora wrote:
> I
> would recommend using the C API
I would recommend against this -- there is a lot of code to write in
extensions to make sure you do reference counting, etc, and it is hard
to get right.
Much of it is also boiler-plate code, so it makes more sense to have
that code auto-
On Mon, February 4, 2008 4:39 pm, Lisandro Dalcin wrote:
> Pearu, now that f2py is part of numpy, I think it would be easier for
> you and also for users to post to the numpy list for f2py-related
> issues. What do you think?
Personaly, I don't have strong opinions on this.
On one hand, it would
On Mon, Feb 4, 2008 at 11:59 AM, Stuart Brorson <[EMAIL PROTECTED]> wrote:
>round -> works fine.
>ceil -> throws exception: 'complex' object has no attribute 'ceil'
>floor -> throws exception: 'complex' object has no attribute 'floor'
>fix -> throws exception: 'complex' object h
On Feb 4, 2008 10:34 AM, Stuart Brorson <[EMAIL PROTECTED]> wrote:
> Hi --
>
> I'm fiddling with NumPy's chopping and truncating operators: round,
> fix, ceil, and floor. In the case where they are passed real args,
> they work just fine. However, I find that when they are passed
> complex args
round -> works fine.
ceil -> throws exception: 'complex' object has no attribute 'ceil'
floor -> throws exception: 'complex' object has no attribute 'floor'
fix -> throws exception: 'complex' object has no attribute 'floor'
>> My question: Is this a bug or a feature? It seems
On Mon, Feb 4, 2008 at 6:56 AM, Sebastian Haase <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Can this be changed:
> If I have a list L the usual N.asarray( L ) works well -- however I
> just discovered that N.asarray( reversed( L ) ) breaks my code
>
> Apparently reversed( L ) returns an iterator ob
On Mon, Feb 4, 2008 at 10:34 AM, Stuart Brorson <[EMAIL PROTECTED]> wrote:
> Hi --
>
> I'm fiddling with NumPy's chopping and truncating operators: round,
> fix, ceil, and floor. In the case where they are passed real args,
> they work just fine. However, I find that when they are passed
> comp
Hi --
I'm fiddling with NumPy's chopping and truncating operators: round,
fix, ceil, and floor. In the case where they are passed real args,
they work just fine. However, I find that when they are passed
complex args, I get the following:
round -> works fine.
ceil -> throws exception: 'comple
On Feb 4, 2008, at 9:39 AM, Matthieu Brucher wrote:
> This can be avoided, but you'll have to use more powerful tools. I
> would advice SWIG (see my blog for some examples with C++ and SWIG).
Note that a lot of work has been done to bridge between numpy and
swig. There is a swig interface f
I have a variety of experiments that I put in this mercurial repo:
https://nbecker.dyndns.org/hg/
The primary aim of this is to reuse c++ code written to a generic container
interface, with numpy.
___
Numpy-discussion mailing list
Numpy-discussion@scip
--- Matthieu Brucher <[EMAIL PROTECTED]>
wrote:
> Whatever solution you choose (Boost.Python, ...),
> you will have to use the
> Numpy C API at least a little bit. So Travis' book
> is a good start. As Gaël
> told you, you can use ctypes if you wrap manually
> every method with a C
> function an
2008/2/4, Lou Pecora <[EMAIL PROTECTED]>:
>
> Dear Mr. Fulco ,
>
> This may not be exactly what you want to do, but I
> would recommend using the C API and then calling your
> C++ programs from there (where interface functions to
> the C++ code is compiled in the extern "C" {, }
> block. I will b
Dear Mr. Fulco ,
This may not be exactly what you want to do, but I
would recommend using the C API and then calling your
C++ programs from there (where interface functions to
the C++ code is compiled in the extern "C" {, }
block. I will be doing this soon with my own project.
Why? Because t
On Mon, Feb 04, 2008 at 11:02:29AM -0500, Vince Fulco wrote:
> Any trailheads for the simplest approach
I find ctypes very easy to understand. See
http://www.scipy.org/Cookbook/Ctypes for simple instructions.
HTH,
Gaël
___
Numpy-discussion mailing list
Dear Numpy Experts- I find myself working with Numpy arrays and
wanting to access *simple* C++ functions for time series returning the
results to Numpy. As I am a relatively new user of Python/Numpy, the
number of paths to use in incorporating C++ code into one's scripts is
daunting. I've attemp
2008/2/4, Lars Friedrich <[EMAIL PROTECTED]>:
>
> Hi,
>
> > 2) Is there a way to use another algorithm (at the cost of performance)
> >> > that uses less memory during calculation so that I can generate
> bigger
> >> > histograms?
> >
> >
> > You could work through your array block by block. Simply
On 2/1/08, Pearu Peterson <[EMAIL PROTECTED]> wrote:
> >> Sorry, I haven't been around there long time.
> >
> > Are you going to continue not reading the f2py list? If so, you should
> > point everyone there to this list and close the list.
>
> Anyway, I have subscribed to the f2py list again I'll
Hi,
Can this be changed:
If I have a list L the usual N.asarray( L ) works well -- however I
just discovered that N.asarray( reversed( L ) ) breaks my code
Apparently reversed( L ) returns an iterator object, and N.asarray(
reversed( L ) ) (called arrY in my function)
results in:
(Pdb) p
Hi,
While studying a bit nsis (an open source system to build windows
installers), I realized that it would be good if we could detect the
target CPU and install the right numpy accordingly. I have coded a
nsis plugin to detect SSE availability (no SSE vs SSE vs SSE2 vs SS3),
and including insta
Hi,
> 2) Is there a way to use another algorithm (at the cost of performance)
>> > that uses less memory during calculation so that I can generate bigger
>> > histograms?
>
>
> You could work through your array block by block. Simply fix the range and
> generate an histogram for each slice of 10
30 matches
Mail list logo