Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Element misalignment passing numpy array with distutils
Post: RE: Element misalignment passing numpy array with ...

I thought I should post the whole C code. #include <stdio.h> #include <stdlib.h> #include "/home/peter/anaconda3/include/python3.7m/Python.h" #include "numpy/arrayobject.h" #define NPY_N...
OTAGOHARBOUR General Coding Help 1 2,067 Dec-06-2019, 01:47 AM
    Thread: Element misalignment passing numpy array with distutils
Post: Element misalignment passing numpy array with dist...

I have a 4D numpy array, surfaceVectors, where the 4th dimension is the unnormalized vector (size and direction) at each voxel of a 3D volume. I make a corresponding 3D volume, magnitudes, where ea...
OTAGOHARBOUR General Coding Help 1 2,067 Dec-05-2019, 11:55 PM
    Thread: PyArray_SimpleNew gives "ValueError: array is too big; for 3-cubed array
Post: PyArray_SimpleNew gives "ValueError: array is too ...

I am using Anaconda Spyder 3.3.6 (Python 3.7) on CentOS 7. I started out with the following code in the surfaceModules module. static PyObject * squeezeSurfaces(PyObject* self, PyObject* args) { ...
OTAGOHARBOUR General Coding Help 1 3,067 Nov-27-2019, 04:03 PM
    Thread: Anaconda Spyder erratically reset by distutils C extension
Post: RE: Anaconda Spyder erratically reset by distutils...

@casevh. That appears to have worked. Thanks very much
OTAGOHARBOUR General Coding Help 4 2,425 Nov-27-2019, 12:44 PM
    Thread: Anaconda Spyder erratically reset by distutils C extension
Post: RE: Anaconda Spyder erratically reset by distutils...

I tried running the following code. import surfaceModules as sm import numpy as NP x=NP.zeros(27) for i in range(0,27): x[i]=i x=x.reshape(3,3,3) jfac=2 xfac=1.5 y=sm.squeezeSurfaces(x, jfac, xfac)...
OTAGOHARBOUR General Coding Help 4 2,425 Nov-26-2019, 08:45 PM
    Thread: Anaconda Spyder erratically reset by distutils C extension
Post: Anaconda Spyder erratically reset by distutils C e...

I am using Anaconda Spyder 3.3.6 (Python 3.7) on CentOS 7. I would like to pass 3D numpy arrays to a C function that processes the input and returns a numpy array as output. The C code is in a module,...
OTAGOHARBOUR General Coding Help 4 2,425 Nov-26-2019, 04:59 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020