Here is a summary of what I did with numpy and the dll
I have verified that the values entering the last dll call (dl.cfunction) are
identical across platforms.
The c function has a signature as follows:
int cfunction(int len_data, float* data, int* ac, int num_ac,
int flag1, int
The c function has a signature as follows:
int cfun(int len_data, float* data, int* a, int num_a,
int flag1, int flag2, int flag3, float* param,
float* out1, float* out2, float* out3)
and in python:
import numpy as np
import ctypes as ct
data = np.atleast_2d(np.float32(data
Hello ChrisA,
I don't quite understand, the binary shared library contains no python
interfaces, it should be independent of python. As a matter of fact, I have
successfully used it in Conda python 2.7, 3.5, Julialang as well as c++
executables. I think the fact that only stock python 2.7 faile
Thanks for all the replies.
It turned out that the Apple OS X stock python 2.7 gives the wrong results, but
other distributions like 2.7 from miniconda gives the correct results. Facepalm.
--
https://mail.python.org/mailman/listinfo/python-list
I have a dynamic library doing some numerical computations.
I used ctypes to interact it by passing numpy arrays back and forth.
Python 3.5 gives me the correct results.
Python 2.7 gives me different, erroneous results, but it never crashes.
How is this possible? There is no string operatio