Re: [Numpy-discussion] Build fortran extension on Windows with gfortran and MSVC

2016-02-11 Thread Jose Gomez-Dans
Hi, On 11 February 2016 at 15:40, Marek Wojciechowski wrote: > It seems that on Windows + Python-3.5 fortran extensions cannot be built > anymore with f2py and mingw32 compilers, because of new MSVC. Here is the > short description of the errors one gets: > Off-topic, but this is something th

Re: [Numpy-discussion] Calculation of a hessian

2014-08-08 Thread Jose Gomez-Dans
Your function looks fairly simple to differentiate by hand, but if you have access to the gradient (or you estimate it numerically using scipy...), this function might do the job: def hessian ( x, the_func, epsilon=1e-8): """Numerical approximation to the Hessian Parameters ---

Re: [Numpy-discussion] f2py and setup.py how can I specify where the .so file goes?

2013-07-12 Thread Jose Gomez-Dans
Hi Scott, thanks for your help. On 12 July 2013 10:02, Scott Sinclair wrote: > > Something like the following should work... [...] > Your suggestion works like what I already had. The issue is that the .so created by the Extension is copied to copying /lib/python2.7/site-packages/ and not to /lib

[Numpy-discussion] f2py and setup.py how can I specify where the .so file goes?

2013-07-10 Thread Jose Gomez-Dans
Hi, I am building a package that exposes some Fortran libraries through f2py. The packages directory looks like this: setup.py my_pack/ | |-->__init__.py |--> some.pyf |---> code.f90 I thoughat that once installed, I'd get the .so and __init__.py in the same directo

Re: [Numpy-discussion] Multidimensional neighbours

2012-08-17 Thread Jose Gomez-Dans
Hi, On 16 August 2012 19:38, Sebastian Berg wrote: > Hello, > > Just to throw it in, if you do not mind useing scipy, you can use its > multidimensional correlate method instead: > Well, I don't need to count the number of neighbours as in the linked example. What I wanted to have is easy acces

[Numpy-discussion] Multidimensional neighbours

2012-08-16 Thread Jose Gomez-Dans
Hi, I've just come across Travis Oliphant's array version of the game of life here . It's a really nice example of how to efficiently find neighbours using numpy and family. However, I wanted to apply these ideas to higher order arrays (eg GRID being three dimension

[Numpy-discussion] [f2py] How to specify compile options in setup.py

2011-08-16 Thread Jose Gomez-Dans
Hi, Up to now, I have managed to build Fortran extensions with f2py by ussing the following command: $ python setup.py config_fc --fcompiler=gnu95 --f77flags='-fmy_flags' --f90flags='-fmy_flags' build I think that these options should be able to go in a setup.py file, and use the f2py_options fi

[Numpy-discussion] f2py complications

2011-05-12 Thread Jose Gomez-Dans
Hi, We have some fortran code that we'd like to wrap using f2py. The code consists of a library that we compile into an .so file, and a file that wraps that library, which is then wrapped by f2py to provide a clean interface to the library. The process thus includes two steps: 1.- Use a makefile t