Re: [Numpy-discussion] Including .f2py_f2cmap in numpy.distutils?

2015-09-28 Thread Pearu Peterson
Hi, Currently, .f2py_f2cmap must be located in a directory where setup.py or f2py.py is called (to be exact, where numpy.f2py.capi_maps is imported). This location is hardcoded and there is no way to specify the file location within setup.py scripts. However, you don't need to use .f2py_f2cmap

Re: [Numpy-discussion] f2py and callbacks with variables

2015-08-13 Thread Pearu Peterson
with before and after versions of the .pyf file. Go ahead with stackoverflow. Best regards, Pearu Cheers, Casey On 08/12/2015 09:34 PM, Pearu Peterson wrote: Hi Casey, What you observe, is not a f2py bug. When f2py sees a code like subroutine foo call bar end subroutine foo

Re: [Numpy-discussion] f2py and callbacks with variables

2015-08-12 Thread Pearu Peterson
Hi Casey, What you observe, is not a f2py bug. When f2py sees a code like subroutine foo call bar end subroutine foo then it will not make an attempt to analyze bar because of implicit assumption that all statements that has no references to foo arguments are irrelevant for wrapper function

Re: [Numpy-discussion] f2py and debug mode

2014-10-03 Thread Pearu Peterson
Hi, When you run f2py without -c option, the wrapper source files are generated without compiling them. With these source files and fortranobject.c, you can build the extension module with your specific compiler options using the compiler framework of your choice. I am not familiar with Visual

[Numpy-discussion] f2py and Fortran STOP statement issue

2013-11-20 Thread Pearu Peterson
Hi, The issue with wrapping Fortran codes that contain STOP statements has been raised several times in past with no good working solution proposed. Recently the issue was raised again in f2py issues. Since the user was filling to test out few ideas with positive results, I decided to describe

Re: [Numpy-discussion] f2py with allocatable arrays

2012-07-03 Thread Pearu Peterson
On Tue, Jul 3, 2012 at 5:20 PM, Sturla Molden stu...@molden.no wrote: As for f2py: Allocatable arrays are local variables for internal use, and they are not a part of the subroutine's calling interface. f2py only needs to know about the interface, not the local variables. One can have

Re: [Numpy-discussion] Question on F/C-ordering in numpy svd

2012-01-13 Thread Pearu Peterson
On 01/12/2012 04:21 PM, Ivan Oseledets wrote: Dear all! I quite new to numpy and python. I am a matlab user, my work is mainly on multidimensional arrays, and I have a question on the svd function from numpy.linalg It seems that u,s,v=svd(a,full_matrices=False) returns u and v in the

Re: [Numpy-discussion] Build of current Git HEAD for NumPy fails

2011-08-19 Thread Pearu Peterson
On 08/19/2011 02:26 PM, Dirk Ullrich wrote: Hi, when trying to build current Git HAED of NumPy with - both for $PYTHON=python2 or $PYTHON=python3: $PYTHON setup.py config_fc --fcompiler=gnu95 install --prefix=$WHATEVER I get the following error - here for PYTHON=python3.2 The command

Re: [Numpy-discussion] How to start at line # x when using numpy.memmap

2011-08-19 Thread Pearu Peterson
On 08/19/2011 05:01 PM, Brent Pedersen wrote: On Fri, Aug 19, 2011 at 7:29 AM, Jeremy Conlinjlcon...@gmail.com wrote: On Fri, Aug 19, 2011 at 7:19 AM, Pauli Virtanenp...@iki.fi wrote: Fri, 19 Aug 2011 07:00:31 -0600, Jeremy Conlin wrote: I would like to use numpy's memmap on some data

Re: [Numpy-discussion] f2py - undefined symbol: _intel_fast_memset [SEC=UNCLASSIFIED]

2011-08-16 Thread Pearu Peterson
On 08/16/2011 02:32 PM, Jin Lee wrote: Hello, This is my very first attempt at using f2py but I have come across a problem. If anyone can assist me I would appreciate it very much. I have a very simple test Fortran source, sub.f90 which is: subroutine sub1(x,y) implicit none

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

2011-08-16 Thread Pearu Peterson
, On Tue, Aug 16, 2011 at 7:50 PM, Jose Gomez-Dans jgomezd...@gmail.comwrote: 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

[Numpy-discussion] ULONG not in UINT16, UINT32, UINT64 under 64-bit windows, is this possible?

2011-08-15 Thread Pearu Peterson
Hi, A student of mine using 32-bit numpy 1.5 under 64-bit Windows 7 noticed that giving a numpy array with dtype=uint32 to an extension module the following codelet would fail: switch(PyArray_TYPE(ARR)) { case PyArray_UINT16: /* do smth */ break; case PyArray_UINT32: /* do smth */ break;

Re: [Numpy-discussion] Numpy steering group?

2011-05-26 Thread Pearu Peterson
Hi, Would it be possible to setup a signing system where anyone who would like to support Clint could sign and advertise the system on relevant mailing lists? This would provide larger body of supporters for this letter and perhaps will have greater impact to whom the letter will be addressed.

Re: [Numpy-discussion] Numpy steering group?

2011-05-26 Thread Pearu Peterson
On Fri, May 27, 2011 at 7:39 AM, Matthew Brett matthew.br...@gmail.comwrote: Hi, On Thu, May 26, 2011 at 9:32 PM, Pearu Peterson pearu.peter...@gmail.com wrote: Hi, Would it be possible to setup a signing system where anyone who would like to support Clint could sign and advertise

Re: [Numpy-discussion] convert integer into bit array

2011-05-16 Thread Pearu Peterson
Hi, I have used bitarray for that http://pypi.python.org/pypi/bitarray/ Here http://code.google.com/p/pylibtiff/source/browse/#svn%2Ftrunk%2Flibtiff%2Fbitarray-0.3.5-numpy you can find bitarray with numpy support. HTH, Pearu On Mon, May 16, 2011 at 9:55 PM, Nikolas Tautenhahn

Re: [Numpy-discussion] convert integer into bit array

2011-05-16 Thread Pearu Peterson
On Tue, May 17, 2011 at 12:04 AM, Nikolas Tautenhahn virt...@gmx.de wrote: Hi, Here http://code.google.com/p/pylibtiff/source/browse/#svn%2Ftrunk%2Flibtiff%2Fbitarray-0.3.5-numpy you can find bitarray with numpy support. Thanks, that looks promising - to get a numpy array, I need

Re: [Numpy-discussion] convert integer into bit array

2011-05-16 Thread Pearu Peterson
On Tue, May 17, 2011 at 8:05 AM, Pearu Peterson pearu.peter...@gmail.comwrote: On Tue, May 17, 2011 at 12:04 AM, Nikolas Tautenhahn virt...@gmx.dewrote: Hi, Here http://code.google.com/p/pylibtiff/source/browse/#svn%2Ftrunk%2Flibtiff%2Fbitarray-0.3.5-numpy you can find bitarray

Re: [Numpy-discussion] f2py complications

2011-05-12 Thread Pearu Peterson
On Thu, May 12, 2011 at 4:14 PM, Jose Gomez-Dans jgomezd...@gmail.comwrote: 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

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-06 Thread Pearu Peterson
On Fri, May 6, 2011 at 5:55 PM, DJ Luscher d...@lanl.gov wrote: Pearu Peterson pearu.peterson at gmail.com writes: Thanks for the bug report!These issues are now fixed in: https://github.com/numpy/numpy/commit/f393b604 Ralf, feel free to apply this changeset to 1.6.x branch

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-06 Thread Pearu Peterson
On Fri, May 6, 2011 at 10:18 PM, DJ Luscher d...@lanl.gov wrote: I have encountered another minor hangup. For assumed-shape array-valued functions defined within a fortran module there seems to be some trouble in the autogenerated subroutine wrapper interface. I think it has to do with the

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-06 Thread Pearu Peterson
On Sat, May 7, 2011 at 12:00 AM, DJ Luscher d...@lanl.gov wrote: Pearu Peterson pearu.peterson at gmail.com writes: On Fri, May 6, 2011 at 10:18 PM, DJ Luscher djl at lanl.gov wrote: I have encountered another minor hangup. For assumed-shape array-valued functions defined within

Re: [Numpy-discussion] ANN: Numpy 1.6.0 release candidate 2

2011-05-05 Thread Pearu Peterson
On Thu, May 5, 2011 at 11:51 PM, DJ Luscher d...@lanl.gov wrote: Ralf Gommers ralf.gommers at googlemail.com writes: Hi, I am pleased to announce the availability of the second release candidate of NumPy 1.6.0. Compared to the first release candidate, one segfault on (32-bit

Re: [Numpy-discussion] f2py pass by reference

2011-04-12 Thread Pearu Peterson
On Tue, Apr 12, 2011 at 9:06 PM, Mathew Yeates mat.yea...@gmail.com wrote: I have subroutine foo (a) integer a print*, Hello from Fortran! print*, a=,a a=2 end and from python I want to do a=1 foo(a) and I want a's value to now be 2. How do I do this?

Re: [Numpy-discussion] f2py pass by reference

2011-04-12 Thread Pearu Peterson
= i.e. The value of 2 gets printed! This is numpy 1.3.0 -Mathew On Tue, Apr 12, 2011 at 11:45 AM, Pearu Peterson pearu.peter...@gmail.com wrote: On Tue, Apr 12, 2011 at 9:06 PM, Mathew Yeates mat.yea...@gmail.com wrote: I have subroutine foo (a) integer a print

Re: [Numpy-discussion] division operator

2011-04-04 Thread Pearu Peterson
On 04/04/2011 01:49 PM, Alex Ter-Sarkissov wrote: I have 2 variables, say var1=10,var2=100. To divide I do either divide(float(var1),float(var2)) or simply float(var1)/float(var2). I'm just wondering if there's a smarter way of doing this? from __future__ import division var1 = 10 var2

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.6.0 beta 1

2011-03-31 Thread Pearu Peterson
On Thu, Mar 31, 2011 at 12:19 PM, David Cournapeau courn...@gmail.comwrote: On Wed, Mar 30, 2011 at 7:22 AM, Russell E. Owen ro...@uw.edu wrote: In article AANLkTi=eeg8kl7639imrtl-ihg1ncqyolddsid5tf...@mail.gmail.com, Ralf Gommers ralf.gomm...@googlemail.com wrote: Hi, I am

Re: [Numpy-discussion] [SciPy-Dev] ANN: Numpy 1.6.0 beta 1

2011-03-31 Thread Pearu Peterson
On Thu, Mar 31, 2011 at 1:00 PM, Scott Sinclair scott.sinclair...@gmail.com wrote: On 31 March 2011 11:37, Pearu Peterson pearu.peter...@gmail.com wrote: On Thu, Mar 31, 2011 at 12:19 PM, David Cournapeau courn...@gmail.com wrote: On Wed, Mar 30, 2011 at 7:22 AM, Russell E. Owen ro

Re: [Numpy-discussion] Array views

2011-03-29 Thread Pearu Peterson
On Tue, Mar 29, 2011 at 8:13 AM, Pearu Peterson pearu.peter...@gmail.comwrote: On Mon, Mar 28, 2011 at 10:44 PM, Sturla Molden stu...@molden.no wrote: Den 28.03.2011 19:12, skrev Pearu Peterson: FYI, f2py in numpy 1.6.x supports also assumed shape arrays. How did you do that? Chasm

Re: [Numpy-discussion] Array views

2011-03-29 Thread Pearu Peterson
On Tue, Mar 29, 2011 at 11:03 AM, Dag Sverre Seljebotn d.s.seljeb...@astro.uio.no wrote: I think it should be a(1:n*stride:stride) or something. Yes, it was my typo and I assumed that n is the length of the original array. Pearu ___

Re: [Numpy-discussion] Array views

2011-03-28 Thread Pearu Peterson
On Mon, Mar 28, 2011 at 6:01 PM, Sturla Molden stu...@molden.no wrote I'll try to clarify this: ** Most Fortran 77 compilers (and beyond) assume explicit-shape and assumed-size arrays are contiguous blocks of memory. That is, arrays declared like a(m,n) or a(m,*). They are usually passed as

Re: [Numpy-discussion] Array views

2011-03-28 Thread Pearu Peterson
On Mon, Mar 28, 2011 at 10:44 PM, Sturla Molden stu...@molden.no wrote: Den 28.03.2011 19:12, skrev Pearu Peterson: FYI, f2py in numpy 1.6.x supports also assumed shape arrays. How did you do that? Chasm-interop, C bindings from F03, or marshalling through explicit-shape? The latter

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-24 Thread Pearu Peterson
On Thu, Mar 24, 2011 at 2:04 AM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 24 Mar 2011, at 00:34, Derek Homeier wrote: tests with the fink-installed pythons on MacOS X mostly succeeded, with one failure in python2.4 and a couple of issues seemingly related to PPC

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-24 Thread Pearu Peterson
On Thu, Mar 24, 2011 at 10:11 AM, Pearu Peterson pearu.peter...@gmail.comwrote: Regarding this test failure, could you hack the numpy/f2py/tests/test_kind.py script by adding the following code for i in range(20): print '%s - %s, %s' % (i, selected_real_kind(i), selectedrealkind(i

Re: [Numpy-discussion] ANN: Numpy 1.6.0 beta 1

2011-03-24 Thread Pearu Peterson
On Fri, Mar 25, 2011 at 1:44 AM, Derek Homeier de...@astro.physik.uni-goettingen.de wrote: On 24.03.2011, at 9:11AM, Pearu Peterson wrote: Intel-64bit: ERROR: test_assumed_shape.TestAssumedShapeSumExample.test_all

Re: [Numpy-discussion] 1.6: branching and release notes

2011-03-13 Thread Pearu Peterson
On Sun, Mar 13, 2011 at 11:22 AM, Ralf Gommers ralf.gomm...@googlemail.comwrote: Hi all, On Tuesday (~2am GMT) I plan to create the 1.6.x branch and tag the first beta. So please get your last commits for 1.6 in by Monday evening. Also, please review and add to the 1.6.0 release notes. I

Re: [Numpy-discussion] how to compile Fortran using setup.py

2011-03-12 Thread Pearu Peterson
On Fri, Mar 11, 2011 at 3:58 AM, Ondrej Certik ond...@certik.cz wrote: Hi, I spent about an hour googling and didn't figure this out. Here is my setup.py: setup( name = libqsnake, cmdclass = {'build_ext': build_ext}, version = 0.1, packages = [ 'qsnake',

[Numpy-discussion] Pushing changes to numpy git repo problem

2010-12-02 Thread Pearu Peterson
Hi, I have followed Development workflow instructions in http://docs.scipy.org/doc/numpy/dev/gitwash/ but I am having a problem with the last step: $ git push upstream ticket1679:master fatal: remote error: You can't push to git://github.com/numpy/numpy.git Use

Re: [Numpy-discussion] Pushing changes to numpy git repo problem

2010-12-02 Thread Pearu Peterson
Thanks! Pearu On Thu, Dec 2, 2010 at 11:08 PM, Charles R Harris charlesr.har...@gmail.com wrote: On Thu, Dec 2, 2010 at 1:52 PM, Pearu Peterson pearu.peter...@gmail.com wrote: Hi, I have followed Development workflow instructions in  http://docs.scipy.org/doc/numpy/dev/gitwash/ but I

Re: [Numpy-discussion] compile fortran from python

2010-10-11 Thread Pearu Peterson
Hi, You can create a setup.py file containing def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration(None,parent_package,top_path) config.add_library('flib', sources = [test.f95])

Re: [Numpy-discussion] Please help on compilation fortran module using f2py

2010-10-06 Thread Pearu Peterson
Hi, On 10/06/2010 04:57 AM, Jing wrote: Hi, everyone: I am new to the python numpy and f2py. I really need help on compiling FORTRAN module using f2py. I have been searched internet without any success. Here is my setup: I have a Ubuntu 10.04 LTS with python 2.6, numpy 1.3.0 and f2py 2

Re: [Numpy-discussion] f2py problem with complex inout in subroutine

2010-07-24 Thread Pearu Peterson
Hi Mark, On Mon, Jul 19, 2010 at 11:49 AM, Mark Bakker mark...@gmail.com wrote: Thanks for fixing this, Pearu. Complex arrays with intent(inout) don't seem to work either. They compile, but a problem occurs when calling the routine. What problem? Did you fix that as well? I guess so, see

Re: [Numpy-discussion] f2py problem with complex inout in subroutine

2010-07-11 Thread Pearu Peterson
On 07/09/2010 02:03 PM, Mark Bakker wrote: Hello list. The following subroutine fails to compile with f2py. I use a complex variable with intent(inout). It works fine with two real variables, so I have a workaround, but it would be nicer with a complex variable. Any thoughts on what I am

[Numpy-discussion] Possible bug: uint64 + int gives float64

2010-06-13 Thread Pearu Peterson
Hi, I just noticed some weird behavior in operations with uint64 and int, heres an example: numpy.uint64(3)+1 4.0 type(numpy.uint64(3)+1) type 'numpy.float64' Pearu ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org

Re: [Numpy-discussion] Possible bug: uint64 + int gives float64

2010-06-13 Thread Pearu Peterson
On Sun, Jun 13, 2010 at 4:45 PM, Nadav Horesh nad...@visionsense.com wrote: int can be larger than numpy.int64 therefore it should be coerced to float64 (or float96/float128) Ok, I see. The results type is defined by the types of operands, not by their values. I guess this has been discussed

[Numpy-discussion] How to resize numpy.memmap?

2010-06-06 Thread Pearu Peterson
Hi, I am creating a rather large file (typically 100MBi-1GBi) with numpy.memmap but in some cases the initial estimate to the file size is just few bytes too small. So, I was trying to resize the memmap with a failure as demonstrated with the following example: fp = numpy.memmap('test.dat',

Re: [Numpy-discussion] How to resize numpy.memmap?

2010-06-06 Thread Pearu Peterson
PM, Pearu Peterson pearu.peter...@gmail.com wrote: Hi, I am creating a rather large file (typically 100MBi-1GBi) with numpy.memmap but in some cases the initial estimate to the file size is just few bytes too small. So, I was trying to resize the memmap with a failure as demonstrated

Re: [Numpy-discussion] f2py: could not crack entity declaration

2010-03-25 Thread Pearu Peterson
Try renaming GLMnet.f90 to GLMnet.f. HTH, Pearu David Warde-Farley wrote: I decided to give wrapping this code a try: http://morrislab.med.utoronto.ca/~dwf/GLMnet.f90 I'm afraid my Fortran skills are fairly limited, but I do know that gfortran compiles it fine. f2py run on this

Re: [Numpy-discussion] f2py compiler version errors

2010-03-17 Thread Pearu Peterson
source code) Copyright 1999 - 2005 Pearu Peterson all rights reserved. http://cens.ioc.ee/projects/f2py2e/ We're running 64bit linux with python 2.4. How do I make this work? thanks, Peter

Re: [Numpy-discussion] Getting Callbacks with arrays to work

2010-01-12 Thread Pearu Peterson
Hi, The problem is that f2py does not support callbacks that return arrays. There is easy workaround to that: provide returnable arrays as arguments to callback functions. Using your example: SUBROUTINE CallbackTest(dv,v0,Vout,N) IMPLICIT NONE !F2PY intent( hide ):: N INTEGER:: N, ic

Re: [Numpy-discussion] f2py callback bug?

2009-11-25 Thread Pearu Peterson
Pearu Peterson wrote: Hmm, regarding `intent(in, out) j`, this should work. I'll check what is going on.. The `intent(in, out) j` works when pycalc is defined as subroutine: call pycalc(i, j) instead of pyreturn = pycalc(i, j) Pearu

Re: [Numpy-discussion] f2py callback bug?

2009-11-25 Thread Pearu Peterson
= [3] in fortran after pycalc j= 60 [60] [3] Why is the return from foo.calc different from j? How do I make them the same? return j in pycalc doesn't change things. Thanks again! At 12:06 AM 11/25/2009, you wrote: Pearu Peterson wrote: Hmm, regarding `intent(in, out

Re: [Numpy-discussion] f2py callback bug?

2009-11-24 Thread Pearu Peterson
Hi, It is not really a bug what you are seeing.. In pycalc when assigning j = 20 * j you create a new object `j` and the argument object `j`, that links back to Fortran data, gets discarded. So, you can change j inplace, for example: j[:] = 20*j The first argument `i` is int object that

Re: [Numpy-discussion] f2py function callback: error while using repeated arguments in function call

2009-11-09 Thread Pearu Peterson
Yves Frederix wrote: Hi, I am doing a simple function callback from fortran to python for which the actual function call in fortran has repeated arguments. ! callback_error.f90: subroutine testfun(x) double precision, intent(in) :: x double precision :: y !f2py intent(callback)

[Numpy-discussion] ANN: a journal paper about F2PY has been published

2009-10-05 Thread Pearu Peterson
Original Message Subject: [f2py] ANN: a journal paper about F2PY has been published Date: Mon, 05 Oct 2009 11:52:20 +0300 From: Pearu Peterson pearu.peter...@gmail.com Reply-To: For users of the f2py program f2py-us...@cens.ioc.ee To: For users of the f2py program f2py-us

Re: [Numpy-discussion] Superfluous array transpose (cf. ticket #1054)

2009-03-16 Thread Pearu Peterson
On Sun, March 15, 2009 8:57 pm, Sturla Molden wrote: Regarding ticket #1054. What is the reason for this strange behaviour? a = np.zeros((10,10),order='F') a.flags C_CONTIGUOUS : False F_CONTIGUOUS : True OWNDATA : True WRITEABLE : True ALIGNED : True UPDATEIFCOPY : False

Re: [Numpy-discussion] Superfluous array transpose (cf. ticket #1054)

2009-03-16 Thread Pearu Peterson
On Mon, March 16, 2009 4:05 pm, Sturla Molden wrote: On 3/16/2009 9:27 AM, Pearu Peterson wrote: If a operation produces new array then the new array should have the storage properties of the lhs operand. That would not be enough, as 1+a would behave differently from a+1. The former would

Re: [Numpy-discussion] What is the logical value of nan?

2009-03-11 Thread Pearu Peterson
On Wed, March 11, 2009 7:50 am, Christopher Barker wrote: Python does not distinguish between True and False -- Python makes the distinction between something and nothing. In that context, NaN is nothing, thus False. Mathematically speaking, NaN is a quantity with undefined value.

Re: [Numpy-discussion] error handling with f2py?

2009-01-16 Thread Pearu Peterson
On Thu, January 15, 2009 6:17 pm, Sturla Molden wrote: Is it possible to make f2py raise an exception if a fortran routine signals an error? If I e.g. have subroutine foobar(a, ierr) Can I get an exception automatically raised if ierr != 0? Yes, for that you need to provide your own

Re: [Numpy-discussion] f2py - a recap

2008-07-24 Thread Pearu Peterson
Hi, Few months ago I joined a group of system biologist and I have been busy with new projects (mostly C++ based). So I haven't had a chance to work on f2py. However, I am still around to fix f2py bugs and maintain/support numpy.f2py (as long as current numpy maintainers allow it..) -- as a

Re: [Numpy-discussion] set_local_path in test files

2008-07-02 Thread Pearu Peterson
Alan McIntyre wrote: Some test files have a set_local_path()/restore_path() pair at the top, and some don't. Is there any reason to be changing sys.path like this in the test modules? If not, I'll take them out when I see them. The idea behind set_local_path is that it allows running tests

Re: [Numpy-discussion] set_local_path in test files

2008-07-02 Thread Pearu Peterson
On Wed, July 2, 2008 8:25 pm, Robert Kern wrote: On Wed, Jul 2, 2008 at 09:01, Alan McIntyre [EMAIL PROTECTED] wrote: On Wed, Jul 2, 2008 at 9:35 AM, Pearu Peterson [EMAIL PROTECTED] wrote: Alan McIntyre wrote: Some test files have a set_local_path()/restore_path() pair at the top, and some

Re: [Numpy-discussion] error importing a f2py compiled module.

2008-06-23 Thread Pearu Peterson
On Mon, June 23, 2008 10:38 am, Fabrice Silva wrote: Dear all I've tried to run f2py on a fortran file which used to be usable from python some months ago. Following command lines are applied with success (no errors raised) : f2py -m modulename -h tmpo.pyf --overwrite-signature

Re: [Numpy-discussion] seeking help with f2py_options

2008-06-21 Thread Pearu Peterson
On Sat, June 21, 2008 3:28 pm, Helmut Rathgen wrote: Dear all, I am trying to write a setp.py based on numpy.distutils for a mixed python/fortran90 package. I'd like to specify the fortran compiler, such as the path to the compiler, compiler flags, etc. in setup.py. I seemed to understand

Re: [Numpy-discussion] nose changes checked in

2008-06-17 Thread Pearu Peterson
On Tue, June 17, 2008 6:17 am, Robert Kern wrote: On Mon, Jun 16, 2008 at 21:18, Alan McIntyre [EMAIL PROTECTED] wrote: On Mon, Jun 16, 2008 at 9:04 PM, Charles R Harris [EMAIL PROTECTED] wrote: In [1]: numpy.test() Not implemented: Defined_Binary_Op Not implemented: Defined_Binary_Op

Re: [Numpy-discussion] [Numpy-svn] r5198 - trunk/numpy/f2py

2008-05-20 Thread Pearu Peterson
David Cournapeau wrote: Pearu Peterson wrote: So I beg to be flexible with f2py related commits for now. Why not creating a branch for the those changes, and applying only critical bug fixes to the trunk ? How do you define a critical bug? Critical to whom? f2py changes are never

Re: [Numpy-discussion] [Numpy-svn] r5198 - trunk/numpy/f2py

2008-05-20 Thread Pearu Peterson
On Tue, May 20, 2008 12:03 pm, David Cournapeau wrote: Pearu Peterson wrote: f2py changes are never critical to numpy users who do not use f2py. No, but they are to scipy users if f2py cannot build scipy. Well, I know pretty well what f2py features scipy uses and what could break scipy build

Re: [Numpy-discussion] Branching 1.1.x and starting 1.2.x development

2008-05-20 Thread Pearu Peterson
On Tue, May 20, 2008 12:59 pm, Jarrod Millman wrote: Commits to the trunk (1.2.x) should follow these rules: 1. Documentation fixes are allowed and strongly encouraged. 2. Bug-fixes are strongly encouraged. 3. Do not break backwards compatibility. 4. New features are permissible. 5.

Re: [Numpy-discussion] [Numpy-svn] r5198 - trunk/numpy/f2py

2008-05-20 Thread Pearu Peterson
On Tue, May 20, 2008 1:36 pm, Jarrod Millman wrote: On Mon, May 19, 2008 at 10:29 PM, Pearu Peterson [EMAIL PROTECTED] wrote: On Tue, May 20, 2008 1:26 am, Robert Kern wrote: Is this an important bugfix? If not, can you hold off until 1.1.0 is released? The patch fixes a long existing

Re: [Numpy-discussion] [Numpy-svn] r5198 - trunk/numpy/f2py

2008-05-19 Thread Pearu Peterson
CC: numpy-discussion because of other reactions on the subject. On Tue, May 20, 2008 1:26 am, Robert Kern wrote: Is this an important bugfix? If not, can you hold off until 1.1.0 is released? The patch fixes a long existing and unreported bug in f2py - I think the bug was introduced when

Re: [Numpy-discussion] numpy.distutils: building a f2py in a subdir

2008-05-18 Thread Pearu Peterson
On Sun, May 18, 2008 1:14 pm, David Cournapeau wrote: Hi, I would like to be able to build a f2py extension in a subdir with distutils, that is: config.add_extension('foo/bar', source = ['foo/bar.pyf']) A safe approach would be to create a foo/setup.py that contains

Re: [Numpy-discussion] Tagging 1.1rc1 in about 12 hours

2008-05-17 Thread Pearu Peterson
On Sat, May 17, 2008 7:48 pm, Charles R Harris wrote: On Fri, May 16, 2008 at 1:20 AM, Jarrod Millman [EMAIL PROTECTED] wrote: Once I tag 1.1.0, I will open the trunk for 1.1.1 development. ... Any development for 1.2 will have to occur on a new branch. So open the new branch already. I am

Re: [Numpy-discussion] Tagging 1.1rc1 in about 12 hours

2008-05-16 Thread Pearu Peterson
Jarrod Millman wrote: Hello, I believe that we have now addressed everything that was holding up the 1.1.0 release, so I will be tagging the 1.1.0rc1 in about 12 hours. Please be extremely conservative and careful about any commits you make to the trunk until we officially release 1.1.0

Re: [Numpy-discussion] f2py and -D_FORTIFY_SOURCE=2 compilation flag

2008-05-15 Thread Pearu Peterson
Robert Kern wrote: On Wed, May 14, 2008 at 3:20 PM, David Huard [EMAIL PROTECTED] wrote: I filed a patch that seems to do the trick in ticket #792. I don't think this is the right approach. The problem isn't that _FORTIFY_SOURCE is set to 2 but that f2py is doing (probably) bad things

Re: [Numpy-discussion] First steps with f2py and first problems...

2008-05-08 Thread Pearu Peterson
On Thu, May 8, 2008 2:06 pm, LB wrote: Hi, I've tried to follow the example given at : http://www.scipy.org/Cookbook/Theoretical_Ecology/Hastings_and_Powell but I've got errors when compiling the fortran file : 12:53 loic:~ % f2py -c -m hastings hastings.f90 --fcompiler=gnu95 ...

Re: [Numpy-discussion] 673

2008-04-28 Thread Pearu Peterson
Hi, As far as I am concerned, the issue needs a cosmetic fix of renaming pythonxerbla to python_xerbla and the rest of the issue can be postponed to 1.2. Note that this isn't purely a numpy issue. To fix the issue, system or user provided blas/lapack libraries need to be changed, we can only

Re: [Numpy-discussion] tests in distutils/exec_command.py

2008-04-26 Thread Pearu Peterson
On Sat, April 26, 2008 7:53 pm, Zbyszek Szmek wrote: Hi, while looking at test coverage statistics published Stéfan van der Walt at http://mentat.za.net/numpy/coverage/, I noticed that the least-covered file, numpy/distutils/exec_command.py has it's own test routines, e.g.: def

[Numpy-discussion] New web site for the F2PY. tool

2008-04-24 Thread Pearu Peterson
Hi, I have created a new web site for the F2PY tool: http://www.f2py.org that will be used to collect F2PY related information. At the moment, the site contains minimal information but hopefully this will improve in future. One can add content to the f2py.org site after registration (see

Re: [Numpy-discussion] [numscons] 0.6.1 release: it build scipy, and on windows !

2008-04-21 Thread Pearu Peterson
David Cournapeau wrote: - f2py has been almost entirely rewritten: it can now scan the module name automatically, and should be much more reliable. What do you mean by ^^^? ;) Pearu ___

Re: [Numpy-discussion] ticket #587

2008-04-09 Thread Pearu Peterson
On Wed, April 9, 2008 2:13 pm, Jarrod Millman wrote: Hey Pearu, Could you take a quick look at this: http://projects.scipy.org/scipy/numpy/ticket/587 I have fixed it in r4996. However, when trying to change the ticked status, I get forbidden error: TICKET_APPEND privileges are required to

Re: [Numpy-discussion] ticket #587

2008-04-09 Thread Pearu Peterson
On Wed, April 9, 2008 3:25 pm, Jarrod Millman wrote: On Wed, Apr 9, 2008 at 4:59 AM, Pearu Peterson [EMAIL PROTECTED] wrote: I have fixed it in r4996. Thanks, However, when trying to change the ticked status, I get forbidden error: TICKET_APPEND privileges are required to perform

Re: [Numpy-discussion] f2py functions, docstrings, and epydoc

2008-03-27 Thread Pearu Peterson
Hi, Tom Loredo wrote: Hi folks- Can anyone offer any tips on how I can get epydoc to produce API documentation for functions in an f2py-produced module? Currently they get listed in the generated docs as Variables: Variables psigc = fortran object at 0xa3e46b0 sigctp =

Re: [Numpy-discussion] f2py functions, docstrings, and epydoc

2008-03-27 Thread Pearu Peterson
On Thu, March 27, 2008 7:20 pm, Tom Loredo wrote: Pearu- smll_offset = smll_offset exec `smll_offset.__doc__` Thanks for the quick and helpful response! I'll give it a try. I don't grasp why it works, though. I suppose I don't need to, but... I'm guessing the exec adds stuff to the

Re: [Numpy-discussion] f2py : callbacks without callback function as an argument

2008-03-12 Thread Pearu Peterson
On Wed, March 12, 2008 8:38 am, Daniel Creveling wrote: Hello- Is there a way to code a callback to python from fortran in a way such that the calling routine does not need the callback function as an input argument? I'm using the Intel fortran compiler for linux with numpy 1.0.4 and f2py

[Numpy-discussion] ANN: sympycore version 0.1 released

2008-02-29 Thread Pearu Peterson
to fix SymPy performance and robustness issues. Sympycore does not yet have nearly as many features as SymPy. Our goal is to work on in direction of merging the efforts with the SymPy project in the near future. Enjoy! * Pearu Peterson * Fredrik Johansson Acknowledgments: * The work

Re: [Numpy-discussion] f2py: sharing F90 module data between modules

2008-02-12 Thread Pearu Peterson
On Tue, February 12, 2008 7:52 am, Garry Willgoose wrote: I have a suite of fortran modules that I want to wrap with f2py independently (so they appear to python as seperate imports) but where each module has access to another fortran module (which contains global data that is shared between

Re: [Numpy-discussion] [F2PY]: Allocatable Arrays

2008-02-04 Thread Pearu Peterson
On Mon, February 4, 2008 4:39 pm, Lisandro Dalcin wrote: Pearu, now that f2py is part of numpy, I think it would be easier for you and also for users to post to the numpy list for f2py-related issues. What do you think? Personaly, I don't have strong opinions on this. On one hand, it would

Re: [Numpy-discussion] [F2PY]: Allocatable Arrays

2008-02-01 Thread Pearu Peterson
On Fri, February 1, 2008 4:18 pm, Andrea Gavana wrote: Hi Lisandro, On Feb 1, 2008 1:59 PM, Lisandro Dalcin wrote: Sorry if I'm making noise, my knowledge of fortran is really little, but in your routine AllocateDummy your are fist allocating and next deallocating the arrays. Are you sure

Re: [Numpy-discussion] [F2PY]: Allocatable Arrays

2008-02-01 Thread Pearu Peterson
On Fri, February 1, 2008 8:39 pm, Robert Kern wrote: Pearu Peterson wrote: On Fri, February 1, 2008 1:28 pm, Andrea Gavana wrote: Hi All, I sent a couple of messages to f2py mailing list, but it seems like my problem has no simple solution so I thought to ask for some suggestions here

Re: [Numpy-discussion] numpy.distutils does not output compilation warning on win32 ?

2008-01-21 Thread Pearu Peterson
Hi, If I remember correctly then the warnings were disabled because when compiling numpy/scipy on windows there were *lots* of warnings, especially for pyrex generated sources. When there is an error, all warnings will be shown. Hmm, and on linux the warnings should also be shown (this actually

Re: [Numpy-discussion] weird indexing

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 2:16 am, Mathew Yeates wrote: Hi Okay, here's a weird one. In Fortran you can specify the upper/lower bounds of an array e.g. REAL A(3:7) What would be the best way to translate this to a Numpy array? I would like to do something like A=numpy.zeros(shape=(5,)) and

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: Pearu Peterson wrote: Hi, Say, one defines class A(tuple): def __repr__(self): return 'A(%s)' % (tuple.__repr__(self)) and I'd like to create an array of A instances

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: Pearu Peterson wrote: Hi, Say, one defines class A(tuple): def __repr__(self): return 'A(%s)' % (tuple.__repr__(self)) and I'd like to create an array of A instances

Re: [Numpy-discussion] how to create an array of objects that are sequences?

2008-01-04 Thread Pearu Peterson
Just ignore this solution. It was not quite working and I was able to get a segfault from it. Pearu On Fri, January 4, 2008 8:58 pm, Pearu Peterson wrote: On Fri, January 4, 2008 8:00 pm, Pearu Peterson wrote: On Fri, January 4, 2008 7:33 pm, Travis E. Oliphant wrote: Pearu Peterson wrote

Re: [Numpy-discussion] ising model: f2py vs cython comparison

2007-12-23 Thread Pearu Peterson
On Sun, December 23, 2007 3:29 am, Ondrej Certik wrote: Hi, I need to write 2D Ising model simulation into my school, so I wrote it in Python, then rewrote it in Fortran + f2py, and also Cython: http://hg.sharesource.org/isingmodel/ And Cython solution is 2x faster than f2py. I understand,

Re: [Numpy-discussion] ising model: f2py vs cython comparison

2007-12-23 Thread Pearu Peterson
On Sun, December 23, 2007 3:29 am, Ondrej Certik wrote: Hi, I need to write 2D Ising model simulation into my school, so I wrote it in Python, then rewrote it in Fortran + f2py, and also Cython: http://hg.sharesource.org/isingmodel/ And Cython solution is 2x faster than f2py. I understand,

Re: [Numpy-discussion] A quick f2py question

2007-12-05 Thread Pearu Peterson
On Wed, December 5, 2007 8:38 pm, Fernando Perez wrote: ... And I see this message in the build: In: mwrep.pyf:mwrep:unknown_interface:createblocks _get_depend_dict: no dependence info for 'len' This is due to a typo introduced in r4511 and is now fixed in r4553. This bug should not affect

Re: [Numpy-discussion] For review: first milestone of scons support in numpy

2007-10-11 Thread Pearu Peterson
Hi, Examples look good. It seems that you have lots of work ahead;) to add numpy.distutils features that are required to build numpy/scipy. Few comments: 1) Why SConstruct does not have extension? It looks like a python file and .py extension could be used. 2) It seems that scons does not

Re: [Numpy-discussion] For review: first milestone of scons support in numpy

2007-10-11 Thread Pearu Peterson
David Cournapeau wrote: Pearu Peterson wrote: 2) It seems that scons does not interfare with numpy.distutils much. If this is true and numpy/scipy builds will not break when scons is not installed then I think you could continue the scons support development in trunk. It won't break

Re: [Numpy-discussion] For review: first milestone of scons support in numpy

2007-10-11 Thread Pearu Peterson
David Cournapeau wrote: Pearu Peterson wrote: I think this is good. Does scons require python-dev? If not then this will solve one of the frequent issues that new users may experience: not installed distutils. Isn't distutils included in python library ? Not always. For example, in debian

Re: [Numpy-discussion] adopting Python Style Guide for classes

2007-10-02 Thread Pearu Peterson
Jarrod Millman wrote: Hello, .. Please let me know if you have any major objections to adopting the Python class naming convention. I don't object. Once we have agreed to using CapWords for classes, we will need to decide what to do about our existing class names. Obviously, it is

  1   2   >