ow, numpy doesn't have any 3D interpolation routines, so
> you'll have to install scipy. Interp2d will only interpolate slices of your
> data, not the whole volume.
>
> -Joe
>
> On Thu, Jul 9, 2009 at 8:42 AM, Thomas Hrabe wrote:
>>
>> Hi all,
>>
>&g
Hi all,
I am not a newbie to python and numpy, but however, I kinda do not
find a proper solution for my interpolation problem without coding it
explicitly myself.
All I want to do is to increase the resolution of an tree dimensional array.
I have a volume 'a'
a = numpy.random.rand(3,3,3)
now,
Thank you,
first tests work.
Thomas
Travis E. Oliphant wrote:
>
> Thomas Hrabe wrote:
>> Hello everyone,
>>
>> I must report odd behaviour of the numpy arrays regarding the flags set
>> for
>> each array object in C++.
>> Please have a look at the f
Hi all,
this post might not really belong into this forum, but as the functions I am
looking for are member of numpy, I thought I might drop a message at this
point.
I am looking for some functions/ a library converting C aligned arrays to
Fortran, due to the flags problem I mentioned recently in
I tried another approach, creating an array in python with
>>>import numpy;
>>>a = numpy.zeros((2,2),order="C");
>>>a.flags.num
1285
and setting the flags within C++ to 1286.
The value remains the same (1285) after setting it to 1286 in embedded C.
PyArg_ParseTuple(args, "O!",&PyArray_Type, &ar
Hello everyone,
I must report odd behaviour of the numpy arrays regarding the flags set for
each array object in C++.
Please have a look at the following code:
static PyObject* test(PyObject* self,PyObject* args){
int s[2];
s[0] = 1;
s[1] = 1;
char* value = (cha
public C/C++ code available... ???
I would like to have this python call in my C code (without calling an embedded
function or so).
xf = np.asfortranarray(x)
Thank you very much,
Thomas
-Original Message-
From: [EMAIL PROTECTED] on behalf of Thomas Hrabe
Sent: Mon 8/4/2008 2:14 PM
To
Thomas Hrabe <[EMAIL PROTECTED]>:
> I need to convert a 3d array from c alingment to fortran and was wandering
> for the simplest code available.
> Its all about python and an interfaced C++ program, which, however,
> processes fortran aligned arrays.
>
> Is there a simple
Hi all,
I need to convert a 3d array from c alingment to fortran and was wandering for
the simplest code available.
Its all about python and an interfaced C++ program, which, however, processes
fortran aligned arrays.
Is there a simple code from converting an array
arr = numpy.array((30,20,10)
thon
Betreff: Re: [Numpy-discussion] embedded arrays
On Fri, Jun 6, 2008 at 17:10, Thomas Hrabe <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> while writing a extension module in C++ for python & numpy, I find a strange
> error.
>
> I can send and retrieve numpy arrays to and
15:27
An: Discussion of Numerical Python
Betreff: Re: [Numpy-discussion] embedded arrays
On Fri, Jun 6, 2008 at 17:10, Thomas Hrabe <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> while writing a extension module in C++ for python & numpy, I find a strange
> error.
>
> I
Furthermore, I sometimes get a
Segmentation fault
Illegal instruction
and sometimes it works
It might be a memory leak, due to the segfault and the arbitrary behavior.?
Best
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] im Auftrag von Thomas Hrabe
Gesendet: Fr 06.06.2008 15:10
An
Hi all,
while writing a extension module in C++ for python & numpy, I find a strange
error.
I can send and retrieve numpy arrays to and from my module.
But python stops if I do the following:
a = numpy.array([[1.1,2,3],[4,5,6]])
PM.put(a,'a') //send a to the module
b = PM.get('a') //get a ide
By the way, whats a lazy pointer anyway?
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] im Auftrag von Thomas Hrabe
Gesendet: Do 22.05.2008 11:22
An: numpy-discussion@scipy.org
Betreff: [Numpy-discussion] osX leopard linker setting
Hi,
does anybody know the linker settings for
Hi,
does anybody know the linker settings for python c modules on osX ?
i have the original xcode3 tools installed -> gcc 4.0.1
I use
'-bundle -flat_namespace'
for linking now, but I get
ld: can't insert lazy pointers, __dyld section not found for inferred
architecture ppc
Does anybody know
iBook G4 osX 10.5.2
hope this helps!
Numpy is installed in
/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/numpy
Numpy version 1.1.0rc1
Python version 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple
Computer, Inc. build 5363)]
Found 18/18 tests for nu
ti, 2008-05-20 kello 13:36 -0700, Thomas Hrabe kirjoitti:
> Thats what PyErr_Print() prints.
> Python is initialised, for sure
>
> Traceback (most recent call last):
> File "/usr/global/python32/lib/python2.4/site-packages/numpy/__init__.py",
> lin
> e 34, in ?
al Python
Subject: Re: [Numpy-discussion] embeddedPyArray_FromDimsAndDataSegmentationFault
On Tue, May 20, 2008 at 2:01 PM, Thomas Hrabe <[EMAIL PROTECTED]> wrote:
> After all, I figured how to create an numpy in C with the help below.
>
> If called in C, import_array() but actually _import_array()
-
From: [EMAIL PROTECTED] on behalf of Robert Kern
Sent: Wed 5/14/2008 5:12 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] embedded
PyArray_FromDimsAndDataSegmentationFault
On Wed, May 14, 2008 at 6:40 PM, Thomas Hrabe <[EMAIL PROTECTED]> wrote:
>>I didn't
] dimension aligment
On Tue, May 20, 2008 at 11:47 AM, Thomas Hrabe <[EMAIL PROTECTED]> wrote:
>
> Hi all,
>
> just a simple question regarding the alignment of dimensions:
>
>
> given a 3d array
> a =
> numpy.array([[[1,2,3],[4,5,6]],[[7,8,9],[10,11,12]],[
Hi all,
just a simple question regarding the alignment of dimensions:
given a 3d array
a =
numpy.array([[[1,2,3],[4,5,6]],[[7,8,9],[10,11,12]],[[13,14,15],[16,17,18]],[[19,20,21],[22,23,24]]])
a.shape
returns (4,2,3)
so I assume the first digit is the 3rd dimension, second is 2nd dim and thi
>But for the most part, it's much better to drive your C code using
>Python than the other around.
True, the other way arround works fine.
Will investigate further tomorrow, because its a must have feature...
Thanks
<>___
Numpy-discussion mailing list
>I didn't know a person could write a stand-alone program using NumPy
>this way (can you?)
Well, this is possible when you embed python and use the "simple" objects such
as ints, strings,
Why should it be impossible to do it for numpy then?
My plan is to send multidimensional arrays from C t
Hi all,
the PyArray_FromDimsAndData is still cousing me headaches.
Is there anybody out there finding the error of the following code?
#include "Python.h"
#include
int main(int argc,char** argv)
{
int dimensions = 2;
void* value = malloc(sizeof(double)*100);
int* si
Hi all,
I am writing an embedded python application in C/C++ with the following
features:
1. The user is able to execute python commands (works fine with
PyRun_SimpleString)
2. I want the user to be able to load C objects from C into the current python
interpreter, so that the user is able to
Hi all,
currently, I am writing a box of modular functions for exchanging python &
matlab objects (nd arrays in particular).
I am facing an odd problem which I can not explain to myself:
I use
PyArg_ParseTuple(args, "O!s",&PyArray_Type, &array,&na)
for parsing the array and a string.
This funct
] on behalf of Christopher Barker
Sent: Wed 4/23/2008 1:15 PM
To: Discussion of Numerical Python
Subject: Re: [Numpy-discussion] access ndarray in C++
Christopher Barker wrote:
> Thomas Hrabe wrote:
> I'd poke around the wiki, and this mailing list archives, for more examples.
Th
thout using a custom
hack.
Finally, my primary aim is to access 3dimensional arrays of floats in C.
Best,
Thomas
-Original Message-
From: [EMAIL PROTECTED] on behalf of Thomas Hrabe
Sent: Tue 4/22/2008 2:38 PM
To: numpy-discussion@scipy.org
Subject: [Numpy-discussion] access ndarray in C
Hi all!
I am currently developing a python module in C/C++ which is supposed to access
nd arrays as defined by the following command in python
a = numpy.array([1,1,1])
I want to access the array the following way and use the nd array data for
further processing in C.
mymod.doSthg(a)
The exam
29 matches
Mail list logo