On Nov 19, 2007 6:09 PM, David M. Cooke <[EMAIL PROTECTED]> wrote:
> My opinion is that it's not necessary, or correct. The fix leaves
> quotes in if there is no whitespace, so '"Hi"' is converted to
> ['"Hi"'], while '"Hi there"' becomes ['Hi there']. I can't see when
> you'd want that behaviour.
Chris, just to be clear, this is addressed to the OP, correct?
DG
Christopher Barker wrote:
> I'm a bit confused too.
>
> What would be great is a simple trimmed down example -- a
> small-as-you-can-make-it class with a method that shows what you need,
> perhaps with a little C++ sample that us
Christopher Barker wrote:
> What would be great is a simple trimmed down example --
.. and then we'd have an example to put in the numpy.i docs and
examples, too.
By the way Bill, I haven't forgotten the examples I said I'd add to the
docs. I've been distracted away from my SWIG work lately,
this looks like a question for the pythonmac list -- have you tried there?
-Chris
Chris wrote:
> There appears to be a bug in bdist_mpkg on Leopard: it requires
> an "admin" group that does not exist by default. The mpkg build
> dies with a ValueError saying that the group does not exist. Is it
I'm a bit confused too.
What would be great is a simple trimmed down example -- a
small-as-you-can-make-it class with a method that shows what you need,
perhaps with a little C++ sample that uses it. Then we can see how best
to wrap it for python.
-Chris
--
Christopher Barker, Ph.D.
Oceano
Anne Archibald wrote:
>In particular it looks like VTK might be able
> to do what you want.
yes, it can. The way I've seen is to triangulate the surface, then do
"decimation" -- remove the triangles that don't add "much" to the detail
of the surface. I don't know of a way to do something similar
Here is what I am proposing you do: in your interface file, add
something like
PyObject * getMatrix()
{
npy_intp dims[2] = { /* Obtain the dimensions to your
internal matrix */ };
double * data = /* Obtain the pointer to you internal matrix
*/;
return PyA
On 20/11/2007, Geoffrey Zhu <[EMAIL PROTECTED]> wrote:
> I have N tabulated data points { (x_i, y_i, z_i) } that describes a 3D
> surface. The surface is pretty "smooth." However, the number of data
> points is too large to be stored and manipulated efficiently. To make
> it easier to deal with, I
Hallo!
> OK, so the key here is the *internal* matrix. I think you need to
> provide a way to extract that matrix from the C++ application as a numpy
> array. Then you can provide it to your function/method as an INPLACE
> array. No new memory will be allocated.
[...]
> The INPLACE typemaps
Bill Spotz wrote:
>> Again, see above for my use case.
>> But the fortran ordering should not be that hard (only setting the
>> flags
>> and strides right, as in FARRAY2_OUT in numpy2carray.i) - but of
>> course
>> someone has to do it ... ;)
>>
>
> Yes, it shouldn't be too hard. And I li
On Nov 20, 2007, at 7:24 AM, Georg Holzmann wrote:
> Yes but this means that you again allocate an array of the same size.
> E.g. in my algorithm I can have a very big internal matrix in C++
OK, so the key here is the *internal* matrix. I think you need to
provide a way to extract that matrix
A Tuesday 20 November 2007, Geoffrey Zhu escrigué:
> Hi Everyone,
>
> This is off topic for this mailing list but I don't know where else
> to ask.
>
> I have N tabulated data points { (x_i, y_i, z_i) } that describes a
> 3D surface. The surface is pretty "smooth." However, the number of
> data poi
Hi Everyone,
This is off topic for this mailing list but I don't know where else to ask.
I have N tabulated data points { (x_i, y_i, z_i) } that describes a 3D
surface. The surface is pretty "smooth." However, the number of data
points is too large to be stored and manipulated efficiently. To mak
On Nov 20, 2007 1:48 AM, Charles R Harris <[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 19, 2007 5:19 PM, Fernando Perez <[EMAIL PROTECTED]> wrote:
> > We use it for the core of long-running computations:
> >
> > http://dx.doi.org/10.1016/j.acha.2007.08.001
> >
>
> Heh, On subgroups of the Monster con
>
> > Of course : http://matt.eifelle.com/item/5
> > It's a basic version of the wrapper I use in my lab (pay attention to
> > the constructor for instance), I hope you will be able to do something
>
> Thanks !
> But this assumes that the data in my C++ library is stored in a
> PyArrayObject ?
Y
Hallo!
> Is there any doc on numpy.i usage?
yes there is a pdf in /numpy/doc/swig !
LG
Georg
___
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion
Hallo!
> Of course : http://matt.eifelle.com/item/5
> It's a basic version of the wrapper I use in my lab (pay attention to
> the constructor for instance), I hope you will be able to do something
Thanks !
But this assumes that the data in my C++ library is stored in a
PyArrayObject ?
This is
>
> > If what you want is to provide a view from your C++ matrix, this is
> > different. You must either :
> > - propose the array interface
> > - use a Python object inside your C++ matrix (this is to be done, I've a
> > basic example in my blog)
>
Of course : http://matt.eifelle.com/item/5
It's
Christopher Barker wrote:
>
>
> Georg Holzmann wrote:
>> Because I had some troubles in wrapping my C++ library in python/numpy,
>> I did (another) numpy2carray.i file for SWIG.
>
> How is this better/different than numpy.i in:
>
> numpy/doc/swig/numpy.i
>
>> With that interface file it is po
Hallo!
> E.g. in my algorithm I can have a very big internal matrix in C++ (say
> 700 MB - in fortran style). Now I want to have this matrix in numpy to
> plot some parts of it, get some data out of it ... whatever - if I again
> allocate an array of the same size, I am out of memo
--- Rahul Garg <[EMAIL PROTECTED]> wrote:
> hi.
>
> thanks for ur responses .. so it looks like
> python/numpy is used more
> for gluing things together or doing things like
> postprocessing. is
> anyone using it for core calculations .. as in long
> running python
> calculations?
> i used numpy
2007/11/20, Georg Holzmann <[EMAIL PROTECTED]>:
>
> Hallo!
>
> > Really? I worked pretty hard to avoid copies when they were not
> > necessary. For the ARGOUT typemaps, I allocate an array of the
> > requested size and then pass its data buffer to your function. If
>
> Yes but this means that yo
Hallo!
> Really? I worked pretty hard to avoid copies when they were not
> necessary. For the ARGOUT typemaps, I allocate an array of the
> requested size and then pass its data buffer to your function. If
Yes but this means that you again allocate an array of the same size.
E.g. in my a
On Nov 20, 2007, at 1:12 AM, Georg Holzmann wrote:
> The problem I had with numpy.i:
>
> - it copies the arrays on output (Argout Arrays) which was not
> possible
> for my algorithms (I have some very big matrices)
Really? I worked pretty hard to avoid copies when they were not
necessary. F
Rahul Garg wrote:
> a) Can you guys tell me briefly about the kind of problems you are
> tackling with numpy and scipy?
mainly timeseries of Remote Sensing data ('satellite images')
processing. No really fancy math, but huge (sometimes multiple
gigabytes) multidimensional (date, bands, y, x: order
On Nov 19, 2007 5:19 PM, Fernando Perez <[EMAIL PROTECTED]> wrote:
> On Nov 19, 2007 4:05 PM, Rahul Garg <[EMAIL PROTECTED]> wrote:
> > hi.
> >
> > thanks for ur responses .. so it looks like python/numpy is used more
> > for gluing things together or doing things like postprocessing. is
> > anyon
> a) Can you guys tell me briefly about the kind of problems you are
> > tackling with numpy and scipy?
>
>
> Electromagnetic problems: eigenvalues finding, linear systems,
> optimizations...
>
> b) Have you ever felt that numpy/scipy was slow and had to switch to
> > C/C++/Fortran?
>
>
>
> I come
>
> a) Can you guys tell me briefly about the kind of problems you are
> tackling with numpy and scipy?
Manifold learning, and thus unconstrianed optimizations
b) Have you ever felt that numpy/scipy was slow and had to switch to
> C/C++/Fortran?
Not if it is done correctly (I just kept some p
Georg Holzmann wrote:
>>> (I also included an example for an interface to
>>> fortran style arrays).
>>>
>> That, it doesn't have.
>> It has ;) ... look in numpy2carray.i, FARRAY2_OUT (line 175).
>> But yes, sorry, I did no example in example.cpp ...
>>
I'm pretty sure Chris meant that
On Nov 19, 2007 4:05 PM, Rahul Garg <[EMAIL PROTECTED]> wrote:
> hi.
>
> thanks for ur responses .. so it looks like python/numpy is used more
> for gluing things together or doing things like postprocessing. is
> anyone using it for core calculations .. as in long running python
> calculations?
>
Hi,
I'm getting a bit lost in numpy's fancy indexing, using argsort on a
slice of a 4d arrays, and then using the resulting indices to sort other
slices of that same array, preferably in one go.
I have a data[d, b, y, x] array (for the curious: date, band, y, x:
satellite image)
Then I create a s
Hallo!
> How is this better/different than numpy.i in:
>
> numpy/doc/swig/numpy.i
The problem I had with numpy.i:
- it copies the arrays on output (Argout Arrays) which was not possible
for my algorithms (I have some very big matrices)
- it is not possible to 2D or 3D Argout Arrays (why?), in
32 matches
Mail list logo