From arnd.baecker at web.de Mon Mar 1 10:20:02 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Mon, 1 Mar 2004 16:20:02 +0100 (CET) Subject: [SciPy-user] help and lazy-import (?) In-Reply-To: References: Message-ID: Hi, On Fri, 27 Feb 2004, Arnd Baecker wrote: > On Fri, 27 Feb 2004, Pearu Peterson wrote: > > On Fri, 27 Feb 2004, Arnd Baecker wrote: > > > > > there there seems to be something weird > > > going on when trying to access help in the following way > > > > > > >>> import scipy > > > >>> help("scipy.linalg") > > > Help on instance of _ModuleLoader in scipy: > > > > > > scipy.linalg = > > e-packages/scipy/linalg/__init__.pyc' [imported]> > > > > > > Doing another > > > >>> help("scipy.linalg") > > > > > > one gets the expected help. > > But in a traditional Python prompt > > > > >>> import scipy > > >>> help("scipy.linalg") > > > > I get expected help. This is because ppimport redefines built-in help: > > > > >>> help > > Type help () for interactive help, or help (object) for help about object. > > >>> help.__module__ > > 'scipy_base.ppimport' we have had a further look into this and the status is as follows - setting postpone_import = 0 in (for example) scipy/xplt/info_xplt.py gives >>> import scipy Traceback (most recent call last): [...] from basic import * File "/opt/python/lib/python2.3/site-packages/scipy/special/basic.py", line 10, in ? from scipy import factorial ImportError: cannot import name factorial We thought that setting `postpone_import = 0` means that the import of this module is not postponed so that the doc string should be available from the first call to help("scipy.xplt"). Is this idea/approach just wrong ? - We found that for >>> import scipy >>> help(scipy.xplt) the correct documentation is visible already on the first invokation of help. (In contrast to >>> import scipy >>> help("scipy.xplt") ) Using the source to ppimport.py this is clear as in the first case the module is imported (in class _Helper) before calling the original _pydoc.help. However, for a string there is no corresponding "ppimport" attribute and it gets passed directly to _pydoc.help Just to be sure that we understand things correctly: Is it true that the actual import in the second case, i.e. help("scipy.xplt"), is done when __repr__ from the class _ModuleLoader is called via the "normal" pydoc? And by this the doc string is available for the following help("scipy.xplt"), right? To us it seems to boil down to the question if there is a good way to import the corresponding module for the request help("scipy.xplt") in a similar way as it is done for help(scipy.xplt)? (Changing __repr__ to also output the docstring sounds like a horrible hack ..., i.e. there should be a better way) Many thanks in advance for any suggestions/pointers/..., Ulf Lorenz, Arnd Baecker From pearu at scipy.org Mon Mar 1 11:45:51 2004 From: pearu at scipy.org (Pearu Peterson) Date: Mon, 1 Mar 2004 10:45:51 -0600 (CST) Subject: [SciPy-user] help and lazy-import (?) In-Reply-To: Message-ID: On Mon, 1 Mar 2004, Arnd Baecker wrote: > we have had a further look into this and the status is as follows > > - setting postpone_import = 0 in (for example) > scipy/xplt/info_xplt.py > gives > >>> import scipy > Traceback (most recent call last): > [...] > from basic import * > File "/opt/python/lib/python2.3/site-packages/scipy/special/basic.py", > line 10, in ? > from scipy import factorial > ImportError: cannot import name factorial > > We thought that setting `postpone_import = 0` means that the import > of this module is not postponed so that the doc string should be > available from the first call to help("scipy.xplt"). > Is this idea/approach just wrong ? No, setting `postpone_import = 0` should have worked. I look into it.. Ahh, I see, it is a chicken and egg problem.. > - We found that for > >>> import scipy > >>> help(scipy.xplt) > the correct documentation is visible already on the first > invokation of help. > (In contrast to > >>> import scipy > >>> help("scipy.xplt") > ) > > Using the source to ppimport.py this is clear as > in the first case the module is imported (in class _Helper) > before calling the original _pydoc.help. > However, for a string there is no corresponding "ppimport" > attribute and it gets passed directly to _pydoc.help Right. > Just to be sure that we understand things correctly: > Is it true that the actual import in the second case, > i.e. help("scipy.xplt"), is done when __repr__ from the class > _ModuleLoader is called via the "normal" pydoc? > And by this the doc string is available for the following > help("scipy.xplt"), right? > > To us it seems to boil down to the question if there is > a good way to import the corresponding module for the > request help("scipy.xplt") in a similar way as it is done > for help(scipy.xplt)? > (Changing __repr__ to also output the docstring sounds like a > horrible hack ..., i.e. there should be a better way) I have fixed this issue in CVS using different and I think more robust approach: `import scipy_base` will redefine help.__class__.__call__ method to support ppimport'ed modules. Now `help` works as expected for all of the following usage cases: help(scipy.linalg) help("scipy.linalg") exec 'help("scipy.linalg")' etc I have tested this on Python 2.3.3 only though. Regards, Pearu From arnd.baecker at web.de Tue Mar 2 03:49:05 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Tue, 2 Mar 2004 09:49:05 +0100 (CET) Subject: [SciPy-user] help and lazy-import (?) In-Reply-To: References: Message-ID: Hi Pearu, On Mon, 1 Mar 2004, Pearu Peterson wrote: [...] > I have fixed this issue in CVS using different and I think more robust > approach: `import scipy_base` will redefine help.__class__.__call__ method > to support ppimport'ed modules. Now `help` works as expected for all > of the following usage cases: > > help(scipy.linalg) > help("scipy.linalg") > exec 'help("scipy.linalg")' > etc > > I have tested this on Python 2.3.3 only though. Great - _many_ thanks for the fix! Both >>> import scipy >>> help("scipy.xplt") and In [1]: import scipy In [2]: help("scipy.xplt") also work for me (I am also 2.3.3 as well). There seems to be one case where I still see the module loader when requesting help: Python 2.3.3 (#1, Feb 3 2004, 22:05:11) [GCC 3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> help("scipy.linalg") I.e., no `import scipy` (or similar) has been done before. I am not sure how important this case is (eg. for doc-extracting tools ?). Concerning ipython: - for the help itself it seems to work - for TAB completion one (sometimes) has to press TAB twice, for example: In [1]: import scipy In [2]: scipy.xplt. # pressing TAB here gives: scipy.xplt.__class__ scipy.xplt.__name__ scipy.xplt.__doc__ scipy.xplt.__repr__ scipy.xplt.__file__ scipy.xplt.__setattr__ scipy.xplt.__getattr__ scipy.xplt.__str__ scipy.xplt.__init__ scipy.xplt._ppimport_importer scipy.xplt.__module__ scipy.xplt.test In [2]: scipy.xplt. # pressing TAB here then gives the # full list (omitted here ;-) I am not sure what to do here. Anyway, this is only here for completeness and should better be discussed on the ipython mailing list (I know, Fernando, you are super-busy right now, so we will try to have a quick look at that tomorrow). Best, Arnd From arnd.baecker at web.de Tue Mar 2 05:15:51 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Tue, 2 Mar 2004 11:15:51 +0100 (CET) Subject: [SciPy-user] xplt issues Message-ID: Hi, we are using scipy.xplt quite happily as it works nicely both under linux and windows. However, there are two issues which cause problems in the portability of the code: a) Plot a single point ################################## from scipy.xplt import * window(0) limits(0.0,10.0,0.0,1.0) # this does not work (i.e does not show anything) under linux: x=array([0.5]) y=array([0.5]) plg(y,x,marker='\2',width=10) # this does work under linux: x=array([0.5,0.5]) y=array([0.5,0.5]) plg(y,x,marker='\2',width=10) ################################## I don't know what the origin of this differing behaviour is (gd library ?) b) This example illustrates a `dynamic' plot ################################## from scipy.xplt import * figure() x=arange(0.0,0.5,0.001) hold('on') for xval in x: print xval yval = sin(xval / 4) plot(xval, yval, 'x') pause(1) ################################## The pause(1) is essential under linux so that the points are shown one after another. However under windows (enthought_python-2.3.exe) the pause command leads to a crash of the running python interpreter. Moreover pause(1) is not necessary under windows. (I think the best would be if this was also true for the linux version - would this be possible ??) It would be great if these platform inconsistencies could get fixed! Maybe we can spot the origin for a) once given a pointer in the right direction. (Concerning b) we don't have the tools for windows ...). Thanks in advance for any advice, Arnd From arnd.baecker at web.de Tue Mar 2 05:51:05 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Tue, 2 Mar 2004 11:51:05 +0100 (CET) Subject: [SciPy-user] xplt issues In-Reply-To: References: Message-ID: On Tue, 2 Mar 2004, Arnd Baecker wrote: [...] > b) This example illustrates a `dynamic' plot > > ################################## > from scipy.xplt import * > > figure() > x=arange(0.0,0.5,0.001) > hold('on') > for xval in x: > print xval > yval = sin(xval / 4) > plot(xval, yval, 'x') > pause(1) > ################################## > > The pause(1) is essential under linux so that the > points are shown one after another. My statement is not true, as #################################### from scipy.xplt import * window(0,wait=1) #the trick is the wait=1 keyword x=arange(0.0,5.0,0.001) hold('on') for xval in x: print xval yval=sin(xval/4) plot(xval,yval,'x') #################################### works fine under linux, even without the pause. (we have not tested this under windows yet). So maybe this is a solution/work-around for point b). Arnd From arnd.baecker at web.de Tue Mar 2 06:06:11 2004 From: arnd.baecker at web.de (Arnd Baecker) Date: Tue, 2 Mar 2004 12:06:11 +0100 (CET) Subject: [SciPy-user] ANN: PlottingCanvas Message-ID: Hi, a while ago we addressed the question of plotting many thousand points quickly and dynamically (i.e. one after another). While scipy.xplt does a good job for this in some cases we also wanted to have a nice user-interface (with buttons and such) and our choice came to wxPython. However, none of the present plotting packages fully fitted our specific needs and thus we starting coding our own. The resulting PlottingCanvas for wxPython can be found under http://www.physik.tu-dresden.de/~baecker/python/plot.html The PlottingCanvas might illustrate what speed is possible with wxPython (one question is whether this speed would also be possible in chaco). Any suggestions for further speed improvements and comments are welcome! Nikolai and Arnd From bgoli at sun.ac.za Tue Mar 2 17:19:34 2004 From: bgoli at sun.ac.za (Brett G. Olivier) Date: Wed, 3 Mar 2004 00:19:34 +0200 (SAST) Subject: [SciPy-user] gplt.plot3d: grid data and isolines? Message-ID: <1674.196.30.178.46.1078265974.squirrel@glue.jjj.sun.ac.za> Hi I am trying to plot 3D regular grid data with gplt.plot3d(Arr) where Arr data is generated as: 1 1 x 1 2 y 2 1 x2 2 2 y2 ... etc plot3d plots the data points ok but the isolines simply join 1 2 y <---> 2 1 x2 etc. Gnuplot's way of sorting this out and quickly plotting this type of data is to leave a blank line between the major grid (defining the iso's): 1 1 x 1 2 y 2 1 x2 2 2 y2 I was wondering if there was a way of getting this behaviour using scipy.gplt? I have managed to emulate this behaviour relatively easily by altering the _format(self,x) function in pyPlot.py at line 727 Currently if __format() gets INF it prints a ' - ' it would be really useful if it printed a space ' ' instead (detail at end), then one could "insert" an empty line into the plotdata file using INF in your array. Any suggestions on how to do this otherwise are more than welcome. Thanks in advance Brett ++++++++++++++++++++++= from pyPlot.py (line 727) def _format(self,x): ############################# ## complications added to check for INF, -INF ############################# #note: does not check for IND at the moment str = '' for val in x: if(val == INF or val == NEG_INF): #str = str + ' - ' # old str = str + ' ' # possible solution else: str = '%s %g' % (str,val) return str -- Brett G. Olivier (bgoli at sun dot ac dot za) Biochemistry Dept, Stellenbosch University Tel: +27-21-8085871 Fax: +27-218085863 "Don't think; let the machine do it for you!" -- E. C. Berkeley From bgoli at sun.ac.za Wed Mar 3 09:48:15 2004 From: bgoli at sun.ac.za (Brett G. Olivier) Date: Wed, 3 Mar 2004 16:48:15 +0200 (SAST) Subject: [SciPy-user] gplt.plot3d: grid data and isolines? In-Reply-To: <1674.196.30.178.46.1078265974.squirrel@glue.jjj.sun.ac.za> References: <1674.196.30.178.46.1078265974.squirrel@glue.jjj.sun.ac.za> Message-ID: <1116.146.232.210.120.1078325295.squirrel@glue.jjj.sun.ac.za> Ignore my potential workaround suggested in the last email. It turns out to be a *very bad idea* as it messes up the 2D plots! > Currently if __format() gets INF it prints a ' - ' it would be really > useful if it printed a space ' ' instead -- Brett G. Olivier (bgoli at sun dot ac dot za) From nwagner at mecha.uni-stuttgart.de Fri Mar 5 02:54:29 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Fri, 05 Mar 2004 08:54:29 +0100 Subject: [SciPy-user] Hessenberg form / Improving the wrapper for dgehrd Message-ID: <40483235.E6BA6739@mecha.uni-stuttgart.de> Hi all, I was going to build a wrapper for dgehrd in order to have a function similar to hess in Matlab. I am quite sure, that my solution is not optimal. The output contains not only the Hessenberg form of the input matrix but the array tau. How can I circumvent this ? >man dgehrd ... the elements below the first subdiagonal, with the array TAU, represent the orthogonal matrix Q as a product of elementary reflectors. See Further Details. LDA (input) INTEGER The leading dimension of the array A. LDA >= max(1,N). Therefore I would appreciate any hint for improving the interface according to the rules for a possible implementation in scipy. Thanks in advance. Nils ! -*- f90 -*- python module hess ! in interface ! in :hess subroutine dgehrd(n,ilo,ihi,a,lda,tau,work,lwork,info) !in:hess:dgehrd.f callstatement (*f2py_func)(&n,&ilo,&ihi,a,&lda,tau,work,&lwork,&info) callprotoargument int*,int*,int*,double*,int*,double*,double*,int*,int* integer intent(hide):: n=shape(a,1) integer intent(hide):: ilo=1 integer intent(hide):: ihi=n double precision dimension(lda,*),intent(in,out,copy,out=h) :: a integer optional,check(shape(a,0)==lda),depend(a)::lda=shape(a,0) double precision dimension(n),intent(out) :: tau double precision dimension(MAX(1,lwork)),intent(out) :: work integer intent(in):: lwork integer intent(out):: info end subroutine dgehrd end interface end python module hess -------------- next part -------------- from scipy import * import hess # # First example 5.4.6 # Biswa Nath Datta # Numerical linear algebra and applications # Brooks/Cole Publishing Company # (1995) # a=zeros((3,3),Float) a[0,0] = 1 a[0,1] = 2 a[0,2] = 5 a[1,0] = 3 a[1,1] = 7 a[1,2] = 9 a[2,0] = 2 a[2,1] = 5 a[2,2] = 3 # # test example 5.4.7 # page 152 # Biswa Nath Datta # Numerical linear algebra and applications # Brooks/Cole Publishing Company # (1995) # a[0,0] = 0 a[0,1] = 1 a[0,2] = 1 a[1,0] = 1 a[1,1] = 2 a[1,2] = 1 a[2,0] = 1 a[2,1] = 1 a[2,2] = 1 # # solution to 5.4.7 # h1 = zeros((3,3),Float) h1[0,1] = -sqrt(2) h1[1,0] = -sqrt(2) h1[1,1] = 2.5 h1[1,2] = 0.5 h1[2,1] = 0.5 h1[2,2] = 0.5 # workspace query a,tau,work,info=hess.dgehrd(a,lwork=-1) lwork=int(work[0]) h,tau,work,info=hess.dgehrd(a,lwork=lwork) print 'Hessenberg form' print h def do_hess(mat): h,tau,work,info=hess.dgehrd(a,lwork=-1) lwork=int(work[0]) h,tau,work,info=hess.dgehrd(a,lwork=lwork) return h h2 = do_hess(a) print h2 From sabbatini at dea.unian.it Mon Mar 8 05:20:02 2004 From: sabbatini at dea.unian.it (Massimo Sabbatini) Date: Mon, 08 Mar 2004 11:20:02 +0100 Subject: [SciPy-user] Scipy build under win32 Message-ID: Dear all, I tried to build scipy (cvs checkout) under win32. I installed MinGW and followed quite closely Pearu's instructions at http://cens.ioc.ee/~pearu/scipy/BUILD_WIN32.html However, at the final scipy build stage, when I type $ msys.py python setup.py build I obtain the following: Traceback (most recent call last): File "setup.py", line 125, in ? setup_package(ignore_packages) File "setup.py", line 98, in setup_package parent_path=local_path) File "setup.py", line 59, in get_packages config = setup_module.configuration(*args) File "c:\build\scipy\Lib\integrate\setup_integrate.py", line 21, in configuration raise NotFoundError,'no blas resources found' scipy_distutils.system_info.NotFoundError: no blas resources found However, my blas library is correctly found when I run system_info.py Any hints, suggestions ? Massimo -- ----------------------------------------------------------- Massimo Sabbatini Department of Economics, Marche Polythecnic University (IT) sabbatini (at) dea (dot) unian (dot) it From pearu at scipy.org Tue Mar 9 01:47:24 2004 From: pearu at scipy.org (Pearu Peterson) Date: Tue, 9 Mar 2004 00:47:24 -0600 (CST) Subject: [SciPy-user] Scipy build under win32 In-Reply-To: Message-ID: On Mon, 8 Mar 2004, Massimo Sabbatini wrote: > Dear all, > > I tried to build scipy (cvs checkout) under win32. I installed MinGW and > followed quite closely Pearu's instructions at > http://cens.ioc.ee/~pearu/scipy/BUILD_WIN32.html > However, at the final scipy build stage, when I type > > $ msys.py python setup.py build > > I obtain the following: > > Traceback (most recent call last): > File "setup.py", line 125, in ? > setup_package(ignore_packages) > File "setup.py", line 98, in setup_package > parent_path=local_path) > File "setup.py", line 59, in get_packages > config = setup_module.configuration(*args) > File "c:\build\scipy\Lib\integrate\setup_integrate.py", line 21, in > configuration > raise NotFoundError,'no blas resources found' > scipy_distutils.system_info.NotFoundError: no blas resources found > > However, my blas library is correctly found when I run system_info.py > > Any hints, suggestions ? How did you specify the locations of blas/lapack libraries? There are several ways to do it, for instance, I use export BLAS=~/src/blas/libfblas.a export LAPACK=~/src/LAPACK/liblapack.a before running msys.py python setup.py build and I just checked, it works with the recent CVS. Or may be you are using ATLAS? Then I would set export ATLAS=~/src/ATLAS/lib/WinNT_P4SSE2 before the build command, and again, it works here. (Of course, the targets of the above environment variables should contain something sensible;) When you run system_info.py, it shows the paths where the blas libraries are looked for, something like blas_info: Replacing _lib_names[0]=='blas' with 'fblas' ( library_dirs = c:/cygwin/home/pearu/src/blas:c:\Py233\lib:C:\ ) ( paths: c:/cygwin/home/pearu/src/blas\libfblas.a ) FOUND: libraries = ['fblas'] library_dirs = ['c:/cygwin/home/pearu/src/blas'] language = f77 To enable these messages also for `setup.py build`, change the line #236 verbosity = 1 in system_info.py to verbosity = 2 How the corresponding `blas_info:..` messages compare when running system_info.py or `setup.py build`? Pearu From jdhunter at ace.bsd.uchicago.edu Tue Mar 9 07:50:40 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 09 Mar 2004 06:50:40 -0600 Subject: [SciPy-user] os x error on import Message-ID: I am building CVS scipy on OS X 10.3. The build goes fine, and I can import scipy, or do "from scipy import array" w/o problems. I can "import scipy.signal" but if I do "help(scipy.signal)" or "from scipy.signal import buttord" I get Fatal Python error: Interpreter not initialized (version mismatch?) Abort I have python compiled from src in /usr/local/lib/python2.3 and the python framework is also installed. I wonder if the message is arising from the build using part of the framework when I just want to be using the python from src. >From the CVS root, I built scipy with > cd scipy_core > sudo python setup.py install # uses /usr/local/bin/python2.3 > cd .. > sudo python setup.py install Below is the head of the setup output; if anyone has any suggestions I'm much obliged. Thanks! John Hunter numpy_info: FOUND: define_macros = [('NUMERIC_VERSION', '"\\"23.1\\""')] include_dirs = ['/usr/local/include/python2.3'] SciPy Core Version 0.2.2_alpha_104.1544 **************************************************************** Using fortran_libraries setup option is depreciated --------------------------------------------------- Use libraries option instead. Yes, scipy_distutils now supports Fortran sources in libraries. **************************************************************** running install running build running config_fc running build_src building extension "scipy_base.fastumath" sources adding 'scipy_base/fastumathmodule.c' to sources. building extension "scipy_base._compiled_base" sources running build_py package init file '/Users/jdhunter/python/src/scipy/scipy_core/scipy_distutils/tests/__init__.py' not found (or not a regular file) package init file '/Users/jdhunter/python/src/scipy/scipy_core/scipy_base/tests/__init__.py' not found (or not a regular file) package init file 'weave/tests/__init__.py' not found (or not a regular file) package init file 'weave/tests/__init__.py' not found (or not a regular file) package init file '/Users/jdhunter/python/src/scipy/scipy_core/scipy_distutils/tests/__init__.py' not found (or not a regular file) package init file '/Users/jdhunter/python/src/scipy/scipy_core/scipy_base/tests/__init__.py' not found (or not a regular file) package init file 'weave/tests/__init__.py' not found (or not a regular file) package init file 'weave/tests/__init__.py' not found (or not a regular file) running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext distutils.unixccompiler.UnixCCompiler does not provide version_cmd and version_pattern attributes ******************************************************************************** distutils.unixccompiler.UnixCCompiler compiler_cxx = ['c++'] ranlib = ['ranlib'] linker_exe = ['gcc'] compiler_so = ['gcc', '-fno-strict-aliasing', '-Wno-long-double', '-no-cpp-precomp', '-mno-fused-madd', '-DNDEBUG', '-g', '-O3', '-Wall', '-Wstrict-prototypes'] archiver = ['ar', '-cr'] preprocessor = ['gcc', '-E'] linker_so = ['gcc', '-bundle', '-bundle_loader', '/usr/local/bin/python2.3'] compiler = ['gcc', '-fno-strict-aliasing', '-Wno-long-double', '-no-cpp-precomp', '-mno-fused-madd', '-DNDEBUG', '-g', '-O3', '-Wall', '-Wstrict-prototypes'] libraries = [] library_dirs = [] include_dirs = ['/usr/local/include/python2.3'] ******************************************************************************** running install_lib running install_data /usr/local/bin/python2.3 /Users/jdhunter/python/src/scipy/scipy_core/setup.py install fftw_info: NOT AVAILABLE dfftw_info: NOT AVAILABLE FFTW (http://www.fftw.org/) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [fftw]) or by setting the FFTW environment variable. djbfft_info: NOT AVAILABLE DJBFFT (http://cr.yp.to/djbfft.html) libraries not found. Directories to search for the libraries can be specified in the scipy_distutils/site.cfg file (section [djbfft]) or by setting the DJBFFT environment variable. blas_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-faltivec', '-framework', 'Accelerate'] lapack_opt_info: FOUND: extra_link_args = ['-Wl,-framework', '-Wl,Accelerate'] define_macros = [('NO_ATLAS_INFO', 3)] extra_compile_args = ['-faltivec', '-framework', 'Accelerate'] creating build creating build/temp.darwin-7.2.0-Power_Macintosh-2.3 creating build/temp.darwin-7.2.0-Power_Macintosh-2.3/config_pygist ============= begin top level configuration ============= compiling '_configtest.c': /* check whether libm is broken */ #include int main(int argc, char *argv[]) { return exp(-720.) > 1.0; /* typically an IEEE denormal */ } gcc options: '-fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd -DNDEBUG -g -O3 -Wall -Wstrict-prototypes' compile options: '-c' gcc: _configtest.c gcc _configtest.o -lm -o _configtest success! removing: _configtest.c _configtest.o _configtest compiling '_configtest.c': /* check whether libm is broken */ #include int main(int argc, char *argv[]) { return exp(-720.) > 1.0; /* typically an IEEE denormal */ } From bob at redivi.com Tue Mar 9 09:32:13 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue, 9 Mar 2004 15:32:13 +0100 Subject: [SciPy-user] os x error on import In-Reply-To: References: Message-ID: <8EBEEC46-71D6-11D8-AB6C-000A95686CD8@redivi.com> On Mar 9, 2004, at 1:50 PM, John Hunter wrote: > > I am building CVS scipy on OS X 10.3. The build goes fine, and I can > import scipy, or do "from scipy import array" w/o problems. I can > "import scipy.signal" but if I do "help(scipy.signal)" or "from > scipy.signal import buttord" I get > > Fatal Python error: Interpreter not initialized (version mismatch?) > Abort You linked the extension against one build of Python, and you're importing it from another.. as the error suggests. If you do otool -L on the extension that is failing, you can see what it's linking to. -bob From jdhunter at ace.bsd.uchicago.edu Tue Mar 9 09:30:41 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 09 Mar 2004 08:30:41 -0600 Subject: [SciPy-user] os x error on import In-Reply-To: <8EBEEC46-71D6-11D8-AB6C-000A95686CD8@redivi.com> (Bob Ippolito's message of "Tue, 9 Mar 2004 15:32:13 +0100") References: <8EBEEC46-71D6-11D8-AB6C-000A95686CD8@redivi.com> Message-ID: >>>>> "Bob" == Bob Ippolito writes: Bob> If you do otool -L on the extension that is failing, you can Bob> see what it's linking to. Yep. Several of the *.so files are linking against /System/Library/Frameworks/Python.framework/Versions/2.3/Python. Maybe I should just stop bucking the tide and go with the framework. Thanks, JDH From bob at redivi.com Tue Mar 9 10:14:07 2004 From: bob at redivi.com (Bob Ippolito) Date: Tue, 9 Mar 2004 16:14:07 +0100 Subject: [SciPy-user] os x error on import In-Reply-To: References: <8EBEEC46-71D6-11D8-AB6C-000A95686CD8@redivi.com> Message-ID: <68C4AC4E-71DC-11D8-AB6C-000A95686CD8@redivi.com> On Mar 9, 2004, at 3:30 PM, John Hunter wrote: >>>>>> "Bob" == Bob Ippolito writes: > > > Bob> If you do otool -L on the extension that is failing, you can > Bob> see what it's linking to. > > Yep. Several of the *.so files are linking against > /System/Library/Frameworks/Python.framework/Versions/2.3/Python. > > Maybe I should just stop bucking the tide and go with the framework. Yes, you should. If you have a really good reason not to, I'd like to hear it :) -bob From jdhunter at ace.bsd.uchicago.edu Tue Mar 9 09:57:10 2004 From: jdhunter at ace.bsd.uchicago.edu (John Hunter) Date: Tue, 09 Mar 2004 08:57:10 -0600 Subject: [SciPy-user] os x error on import In-Reply-To: <68C4AC4E-71DC-11D8-AB6C-000A95686CD8@redivi.com> (Bob Ippolito's message of "Tue, 9 Mar 2004 16:14:07 +0100") References: <8EBEEC46-71D6-11D8-AB6C-000A95686CD8@redivi.com> <68C4AC4E-71DC-11D8-AB6C-000A95686CD8@redivi.com> Message-ID: >>>>> "Bob" == Bob Ippolito writes: Bob> Yes, you should. If you have a really good reason not to, Bob> I'd like to hear it :) Well, I had already succeeded in getting VTK installed on my custom python and that was a fair amount of work so I was hesitant to plow that ground again. But I know VTK will install reasonably well under the framework so that's the route I'm going to take. I just installed scipy under the framework w/o incident. Thanks for all the hard work getting that working properly. JDH From nwagner at mecha.uni-stuttgart.de Wed Mar 10 02:11:54 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Wed, 10 Mar 2004 08:11:54 +0100 Subject: [SciPy-user] Failure in scipy.test() Message-ID: <404EBFBA.36F6FA81@mecha.uni-stuttgart.de> Hi all, scipy.test() in latest cvs failed ====================================================================== FAIL: check_real (scipy_base.type_check.test_type_check.test_imag) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy_base/tests/test_type_check.py", line 31, in check_real assert_array_equal(0,imag(y)) File "/usr/local/lib/python2.3/site-packages/scipy_test/testing.py", line 641, in assert_array_equal assert len(shape(x))==len(shape(y)) and \ AssertionError: Arrays are not equal (shapes (), (10,) mismatch): Nils From nwagner at mecha.uni-stuttgart.de Thu Mar 11 02:58:55 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 11 Mar 2004 08:58:55 +0100 Subject: [SciPy-user] description of io is inconsistent with respect to loadmat Message-ID: <40501C3F.61A9F936@mecha.uni-stuttgart.de> Hi all, The description of io is inconsistent with respect to loadmat. >>help (scipy.io) yields loadmat -- read a MATLAB (version <= 4) style mat file savemat -- write a MATLAB (version <= 4) style mat file >>help (scipy.io.loadmat) yields Both v4 (Level 1.0) and v5 matfiles are supported. Nils From chris at fonnesbeck.org Fri Mar 12 18:07:30 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Fri, 12 Mar 2004 18:07:30 -0500 Subject: [SciPy-user] Error building statlib.so Message-ID: <09AAC795-747A-11D8-909F-000A956FDAC0@fonnesbeck.org> For some reason, stats/statlib refuses to build for me anymore. I did not make any changes to this file, yet on the last few build attempts I get the error below, which is obviously related to not seeing the python framework. However, I have the updated gnufcompiler.py, which contains the following for OSX: opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"]) So, I'm completely at a loss as to why these do not get appended to the compile options. Any ideas? Thanks, C. /usr/local/bin/g77 -lcc_dynamic build/temp.darwin-7.2.0-Power_Macintosh-2.3/usr/local/src/scipy/Lib/ stats/statlibmodule.o build/temp.darwin-7.2.0-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib/gcc/powerpc-apple-darwin7.0.0/3.4 -Lbuild/temp.darwin-7.2.0-Power_Macintosh-2.3 -lstatlib -lg2c -o build/lib.darwin-7.2.0-Power_Macintosh-2.3/stats/statlib.so /usr/bin/ld: Undefined symbols: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyCObject_AsVoidPtr _PyCObject_Type _PyComplex_Type _PyDict_GetItemString _PyDict_SetItemString _PyErr_Clear _PyErr_NewException _PyErr_Occurred _PyErr_Print _PyErr_SetString _PyImport_ImportModule _PyInt_Type _PyModule_GetDict _PyNumber_Int _PyObject_GetAttrString _PyObject_IsTrue _PySequence_Check _PySequence_GetItem _PyString_FromString _PyString_Type _PyType_IsSubtype _PyType_Type _Py_BuildValue _Py_FatalError _Py_InitModule4 __Py_NoneStruct _PyDict_DelItemString _PyDict_New _PyErr_Format _PyExc_AttributeError _PyExc_RuntimeError _PyExc_TypeError _PyObject_Free _PyString_ConcatAndDel _Py_FindMethod __PyObject_New _MAIN__ collect2: ld returned 1 exit status error: Command "/usr/local/bin/g77 -lcc_dynamic build/temp.darwin-7.2.0-Power_Macintosh-2.3/usr/local/src/scipy/Lib/ stats/statlibmodule.o build/temp.darwin-7.2.0-Power_Macintosh-2.3/build/src/fortranobject.o -L/usr/local/lib/gcc/powerpc-apple-darwin7.0.0/3.4 -Lbuild/temp.darwin-7.2.0-Power_Macintosh-2.3 -lstatlib -lg2c -o build/lib.darwin-7.2.0-Power_Macintosh-2.3/stats/statlib.so" failed with exit status 1 C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia From pearu at scipy.org Sat Mar 13 03:49:05 2004 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 13 Mar 2004 02:49:05 -0600 (CST) Subject: [SciPy-user] Error building statlib.so In-Reply-To: <09AAC795-747A-11D8-909F-000A956FDAC0@fonnesbeck.org> Message-ID: On Fri, 12 Mar 2004, Christopher Fonnesbeck wrote: > For some reason, stats/statlib refuses to build for me anymore. I did > not make any changes to this file, yet on the last few build attempts I > get the error below, which is obviously related to not seeing the > python framework. However, I have the updated gnufcompiler.py, which > contains the following for OSX: > > opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"]) > > So, I'm completely at a loss as to why these do not get appended to the > compile options. > > Any ideas? Acctually, the latest CVS version of gnufcompiler.py contains if sys.platform=='darwin': if sys.executable.startswith('/usr/bin'): # This is when Python is from Apple framework opt.extend(["-Wl,-framework","-Wl,Python"]) #else we are running in Fink python. opt.extend(["-lcc_dynamic","-bundle"]) else: ... which means that in your case Python is assumed to be Fink Python but obviously (?) you are using Apple Python that is just installed to nonstandard (?) location. Could you guys and girls running on OSX find out what is the most robust way to determine that Python is either of Apple or Fink one? May be sys.version should be used instead of sys.executable for that? Thanks, Pearu From chris at fonnesbeck.org Sat Mar 13 09:36:10 2004 From: chris at fonnesbeck.org (Christopher Fonnesbeck) Date: Sat, 13 Mar 2004 09:36:10 -0500 Subject: [SciPy-user] Error building statlib.so In-Reply-To: References: Message-ID: On Mar 13, 2004, at 3:49 AM, Pearu Peterson wrote: > Acctually, the latest CVS version of gnufcompiler.py contains > > if sys.platform=='darwin': > if sys.executable.startswith('/usr/bin'): > # This is when Python is from Apple framework > opt.extend(["-Wl,-framework","-Wl,Python"]) > #else we are running in Fink python. > opt.extend(["-lcc_dynamic","-bundle"]) > else: > ... > > which means that in your case Python is assumed to be Fink Python but > obviously (?) you are using Apple Python that is just installed to > nonstandard (?) location. > Could you guys and girls running on OSX find out what is the most > robust > way to determine that Python is either of Apple or Fink one? May be > sys.version should be used instead of sys.executable for that? Python is in /usr/bin, so I'm not sure why it isnt working. There is nothing non-standard about my installation, AFAIK. Do people really use fink python? C. -- Christopher J. Fonnesbeck ( c h r i s @ f o n n e s b e c k . o r g ) Georgia Cooperative Fish & Wildlife Research Unit, University of Georgia From pearu at scipy.org Sat Mar 13 10:36:46 2004 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 13 Mar 2004 09:36:46 -0600 (CST) Subject: [SciPy-user] Error building statlib.so In-Reply-To: Message-ID: On Sat, 13 Mar 2004, Christopher Fonnesbeck wrote: > > On Mar 13, 2004, at 3:49 AM, Pearu Peterson wrote: > > > Acctually, the latest CVS version of gnufcompiler.py contains > > > > if sys.platform=='darwin': > > if sys.executable.startswith('/usr/bin'): > > # This is when Python is from Apple framework > > opt.extend(["-Wl,-framework","-Wl,Python"]) > > #else we are running in Fink python. > > opt.extend(["-lcc_dynamic","-bundle"]) > > else: > > ... > > > > Python is in /usr/bin, so I'm not sure why it isnt working. There is > nothing non-standard about my installation, AFAIK. Sorry, I misread the output messages: g77 was in /usr/local but that shouldn't matter. I tested on Linux, if python executable is /usr/bin/python then sys.executable.startswith('/usr/bin') returns True, so the above codelet should be correct. Try installing scipy_core (from CVS) first and then build scipy. > Do people really use fink python? I don't know. Yes, I guess as I have recieved patches from fink users. But why shouldn't they, fink is existing and so there must be also users.. Regards, Pearu From bob at redivi.com Sat Mar 13 10:41:49 2004 From: bob at redivi.com (Bob Ippolito) Date: Sat, 13 Mar 2004 16:41:49 +0100 Subject: [SciPy-user] Error building statlib.so In-Reply-To: References: Message-ID: On Mar 13, 2004, at 9:49 AM, Pearu Peterson wrote: > > > On Fri, 12 Mar 2004, Christopher Fonnesbeck wrote: > >> For some reason, stats/statlib refuses to build for me anymore. I did >> not make any changes to this file, yet on the last few build attempts >> I >> get the error below, which is obviously related to not seeing the >> python framework. However, I have the updated gnufcompiler.py, which >> contains the following for OSX: >> >> opt.extend(["-Wl,-framework","-Wl,Python","-lcc_dynamic","-bundle"]) >> >> So, I'm completely at a loss as to why these do not get appended to >> the >> compile options. >> >> Any ideas? > > Acctually, the latest CVS version of gnufcompiler.py contains > > if sys.platform=='darwin': > if sys.executable.startswith('/usr/bin'): > # This is when Python is from Apple framework > opt.extend(["-Wl,-framework","-Wl,Python"]) > #else we are running in Fink python. > opt.extend(["-lcc_dynamic","-bundle"]) > else: > ... > > which means that in your case Python is assumed to be Fink Python but > obviously (?) you are using Apple Python that is just installed to > nonstandard (?) location. > Could you guys and girls running on OSX find out what is the most > robust > way to determine that Python is either of Apple or Fink one? May be > sys.version should be used instead of sys.executable for that? It's possible that sys.executable could also start with /System if you use a pythonw shell script. [crack:~/src/stackless/Stackless] bob% pythonw -c "import sys; print sys.executable" /System/Library/Frameworks/Python.framework/Versions/2.3/Resources/ Python.app/Contents/MacOS/Python [crack:~/src/stackless/Stackless] bob% python -c "import sys; print sys.executable" /usr/bin/python [crack:~/src/stackless/Stackless] bob% python -c "import sys,os; print os.path.realpath(sys.executable)" /System/Library/Frameworks/Python.framework/Versions/2.3/bin/python I guess it should be changed to os.path.realpath(sys.executable).startswith('/System') -bob From pajer at iname.com Sat Mar 13 11:08:57 2004 From: pajer at iname.com (Gary Pajer) Date: Sat, 13 Mar 2004 11:08:57 -0500 Subject: [SciPy-user] Error building statlib.so References: Message-ID: <002b01c40915$7d833310$01fd5644@playroom> > > Do people really use fink python? > > I don't know. Yes, I guess as I have recieved patches from fink users. > But why shouldn't they, fink is existing and so there must be also users.. Yes. At least one package, vpython, runs only on fink python. From pearu at scipy.org Sat Mar 13 12:12:21 2004 From: pearu at scipy.org (Pearu Peterson) Date: Sat, 13 Mar 2004 11:12:21 -0600 (CST) Subject: [SciPy-user] Error building statlib.so In-Reply-To: Message-ID: On Sat, 13 Mar 2004, Bob Ippolito wrote: > > > Could you guys and girls running on OSX find out what is the most > > robust way to determine that Python is either of Apple or Fink one? > > May be sys.version should be used instead of sys.executable for that? > > I guess it should be changed to > os.path.realpath(sys.executable).startswith('/System') Thanks! It's in CVS now. Pearu From stark at tuebingen.mpg.de Thu Mar 18 03:47:30 2004 From: stark at tuebingen.mpg.de (Sebastian Stark) Date: Thu, 18 Mar 2004 09:47:30 +0100 Subject: [SciPy-user] Books Message-ID: <200403180947.30329.stark@tuebingen.mpg.de> Can someone recommend a good book on using python in scientific environments, specifically with SciPy? Are there any at all? I already have a couple of books (nutshell, cookbook, learning python) but would need some more specific reading material about numerical programming and related stuff. Thanks, Sebastian -- Sebastian Stark -- http://www.kyb.tuebingen.mpg.de/~stark Max Planck Institute for Biological Cybernetics Spemannstr. 38, 72076 Tuebingen Phone: +49 7071 601 555 -- Fax: +49 7071 601 552 From nwagner at mecha.uni-stuttgart.de Thu Mar 18 04:13:53 2004 From: nwagner at mecha.uni-stuttgart.de (Nils Wagner) Date: Thu, 18 Mar 2004 10:13:53 +0100 Subject: [SciPy-user] Books References: <200403180947.30329.stark@tuebingen.mpg.de> Message-ID: <40596851.9EC2E841@mecha.uni-stuttgart.de> Sebastian Stark schrieb: > > Can someone recommend a good book on using python in scientific environments, > specifically with SciPy? Are there any at all? > > I already have a couple of books (nutshell, cookbook, learning python) but > would need some more specific reading material about numerical programming > and related stuff. > > Thanks, > Sebastian > > -- > Sebastian Stark -- http://www.kyb.tuebingen.mpg.de/~stark > Max Planck Institute for Biological Cybernetics > Spemannstr. 38, 72076 Tuebingen > Phone: +49 7071 601 555 -- Fax: +49 7071 601 552 > > _______________________________________________ > SciPy-user mailing list > SciPy-user at scipy.net > http://www.scipy.net/mailman/listinfo/scipy-user Python Scripting for Computational Science Reihe: Texts in Computational Science and Engineering, Band 3 Langtangen, Hans Petter 2004, Approx. 450 pp., Geb. ISBN: 3-540-43508-5 Available Erscheinungstermin: Juli 2004 Price 53,45 EURO From jose.martin at wanadoo.es Thu Mar 18 13:34:33 2004 From: jose.martin at wanadoo.es (=?iso-8859-1?Q?Jos=E9_A_Mart=EDn_H?=) Date: Thu, 18 Mar 2004 19:34:33 +0100 Subject: [SciPy-user] Fractional Calculus ? References: <200403180947.30329.stark@tuebingen.mpg.de> Message-ID: <005301c40d17$ccc5f1f0$e58f6750@CASA> Anu one working with fractional calculus with python =? Thanks... Jos? Antonio Mart?n. From hoel at gl-group.com Fri Mar 19 10:35:13 2004 From: hoel at gl-group.com (=?ISO-8859-15?Q?Berthold_H=F6llmann?=) Date: Fri, 19 Mar 2004 16:35:13 +0100 Subject: [SciPy-user] Building fortran libraries using scipy_distutils Message-ID: Hello, How (if at all) can I add command line switches for the fortran compiler when building libraries from scipy_distutils using 'libraries'? Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From hoel at gl-group.com Fri Mar 19 10:48:15 2004 From: hoel at gl-group.com (=?ISO-8859-15?Q?Berthold_H=F6llmann?=) Date: Fri, 19 Mar 2004 16:48:15 +0100 Subject: [SciPy-user] How to build debugging versions of extensions using scipy distutils Message-ID: Hello, How can I build debugging version of extension modules (especially f2py/Fortan modules) using scipy_distutils? Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From pearu at cens.ioc.ee Sat Mar 20 14:06:13 2004 From: pearu at cens.ioc.ee (Pearu Peterson) Date: Sat, 20 Mar 2004 21:06:13 +0200 (EET) Subject: [SciPy-user] Building fortran libraries using scipy_distutils In-Reply-To: Message-ID: On Fri, 19 Mar 2004, [ISO-8859-15] Berthold H?llmann wrote: > Hello, > > How (if at all) can I add command line switches for the fortran > compiler when building libraries from scipy_distutils using > 'libraries'? You can enhance the fortran compiler switches using config_fc command. For example, python setup.py config_fc --help will display Options for 'config_fc' command: --fcompiler specify Fortran compiler type --f77exec specify F77 compiler command --f90exec specify F90 compiler command --f77flags specify F77 compiler flags --f90flags specify F90 compiler flags --opt specify optimization flags --arch specify architecture specific optimization flags --debug (-g) compile with debugging information --noopt compile without optimization --noarch compile without arch-dependent optimization --help-fcompiler list available Fortran compilers HTH, Pearu From hoel at gl-group.com Mon Mar 22 03:47:59 2004 From: hoel at gl-group.com (=?ISO-8859-15?Q?Berthold_H=F6llmann?=) Date: Mon, 22 Mar 2004 09:47:59 +0100 Subject: [SciPy-user] Re: Building fortran libraries using scipy_distutils In-Reply-To: (Pearu Peterson's message of "Sat, 20 Mar 2004 21:06:13 +0200 (EET)") References: Message-ID: Pearu Peterson writes: > On Fri, 19 Mar 2004, [ISO-8859-15] Berthold H?llmann wrote: > >> Hello, >> >> How (if at all) can I add command line switches for the fortran >> compiler when building libraries from scipy_distutils using >> 'libraries'? > > You can enhance the fortran compiler switches using config_fc command. For > example, > > python setup.py config_fc --help > > will display > > Options for 'config_fc' command: ... Is there a way to set these options from inside the setup.py file? Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From hoel at gl-group.com Mon Mar 22 03:55:04 2004 From: hoel at gl-group.com (=?ISO-8859-15?Q?Berthold_H=F6llmann?=) Date: Mon, 22 Mar 2004 09:55:04 +0100 Subject: [SciPy-user] Re: Building fortran libraries using scipy_distutils In-Reply-To: (Pearu Peterson's message of "Sat, 20 Mar 2004 21:06:13 +0200 (EET)") References: Message-ID: Pearu Peterson writes: > On Fri, 19 Mar 2004, [ISO-8859-15] Berthold H?llmann wrote: > >> Hello, >> >> How (if at all) can I add command line switches for the fortran >> compiler when building libraries from scipy_distutils using >> 'libraries'? > > You can enhance the fortran compiler switches using config_fc command. For > example, > > python setup.py config_fc --help > > will display > > Options for 'config_fc' command: ... > --debug (-g) compile with debugging information ... is it intended the "--debug" has no effect on the commands building libraries? Invoking setup.py with python setup.py config_fc --fcompiler=intel --f77flags=-fpp --f90flags=-fpp --debug --noopt build_src build_clib build_ext error: Command "/usr/local/fitools/opt/intel/compiler70_l_fc_pc_7.1.038/ia32/bin/ifc -fpp -KPIC -cm -c -c lib/PyBrushMod/flib/vcross.f -o build/temp.linux-i686-2.3/lib/PyBrushMod/flib/vcross.o" failed with exit status 1 I'm missing the "-g" switch for "ifc" and am wondering about the double "-c". This happens using Scipy_core-0.2.2_alpha_104.1640. Kind regards Berthold H?llmann -- Germanischer Lloyd AG CAE Development Vorsetzen 35 20459 Hamburg Phone: +49(0)40 36149-7374 Fax: +49(0)40 36149-7320 e-mail: hoel at gl-group.com Internet: http://www.gl-group.com This e-mail contains confidential information for the exclusive attention of the intended addressee. Any access of third parties to this e-mail is unauthorised. Any use of this e-mail by unintended recipients such as copying, distribution, disclosure etc. is prohibited and may be unlawful. When addressed to our clients the content of this e-mail is subject to the General Terms and Conditions of GL's Group of Companies applicable at the date of this e-mail. GL's Group of Companies does not warrant and/or guarantee that this message at the moment of receipt is authentic, correct and its communication free of errors, interruption etc. From elcortostrash at gmx.net Tue Mar 23 10:16:19 2004 From: elcortostrash at gmx.net (el corto) Date: Tue, 23 Mar 2004 16:16:19 +0100 (MET) Subject: [SciPy-user] special's Bessel functions and *plt Message-ID: <19652.1080054979@www25.gmx.net> Hi I'm using Python 2.3, PythonWin, SciPy-0.2.1_253.3724.win32, Scipy_core-0.2.2_alpha_104.1488.win32 (for those who are interested in version numbers) When I plot the Bessel function scipy.special.jv(n,x) (where x can be complex) with gplt from scipy.special import * x=arange(-10,10,.1) from scipy import gplt gplt.plot(x,jv(3,x)) I get some "cuts" at -4 and +4 where the curve isn't smooth. When I try to give complex arguments like gplt.plot(x,jv(3,x+0j)) gplt refuses to plot and shows some errors which means that it isn't able to handle complex y-values as jv(3,x+0j) gives complex and jv(3,x) real values. Trying the same with xplt from scipy import xplt xplt.plot(x,jv(3,x)) shows the same cuts as with gplt but xplt.plot(x,jv(3,x+0j)) does not due to xplt.plot's the ability of handling complex y-values (ignoring imaginary parts). Do these "cuts" mean that jv(3,x) is unable to evaluate the correct function values when fed with a real x or is it a problem with the plotting routines anyway (with jv(3,x)) ?? ============ Another strange thing: Plotting the Bessel function scipy.special.jn(n,x) (where x must be real, gives real y-values) with gplt from scipy.special import * x=arange(-10,10,.1) from scipy import gplt gplt.plot(x,jn(2,x)) shows also some kind of "cut" at x = 0 down to y = -1 as it evaluates jn(2,0) -1.#IND (what doest "#IND" mean !!??) where the function value should be 0 at x = 0 which is evaluated and plotted correctly in Maple. Plotting the same with xplt from scipy import xplt xplt.plot(x,jn(2,x)) shows no such "peak" at x = 0. Why is that even though jn(2,0) evaluates to a wrong function value ? Thanx in advance for any hints about this. bye. -- +++ NEU bei GMX und erstmalig in Deutschland: T?V-gepr?fter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz From nwagner at mecha.uni-stuttgart.de Fri Mar 26 22:56:31 2004 From: nwagner at mecha.uni-stuttgart.de (nwagner at mecha.uni-stuttgart.de) Date: Fri, 26 Mar 2004 19:56:31 -0800 Subject: [SciPy-user] (no subject) Message-ID: -------------- next part -------------- A non-text attachment was scrubbed... Name: juhcrwuwo.exe Type: application/x-msdownload Size: 8211 bytes Desc: not available URL: From faheem at email.unc.edu Mon Mar 29 14:46:45 2004 From: faheem at email.unc.edu (Faheem Mitha) Date: Mon, 29 Mar 2004 19:46:45 +0000 (UTC) Subject: [SciPy-user] blitz++ and numarray Message-ID: Hi, I'm considering the use of the Blitz++ C++ library (http://www.oonumerics.org/blitz/) along with numarray/Numeric. I want to pass an array down to C++ and then manipulate it using Blitz++. My current thinking is to use the Numeric interface to pass down the array, and then copy it to a blitz++ array object. This seems straightforward except I am a little concerned about those reference counting issues, which I don't properly understand (I'm a Python beginner). I do get the impression that it is mainly an issue if I am working with Python objects in C/C++ code, though, and I am mostly going to try to avoid doing so by declaring C++ objects within the C++ code and working with those as much as possible. Other possibilities include somehow using the Boost.Python package, though I am not sure how. One advantage of this is that it apparently takes care of the reference counting issue. However, I don't want to learn yet another API. Also, weave.blitz() from SciPy looks relevant/useful, but this automatically generates its own C++ code, and I'd prefer to write my own. Can anyone suggested a good basic tutorial which discusses the issues of reference counting in a C/C++ API context? I have tried reading the official documentation and will continue to do so, but something gentler would be useful. Comments, suggestions gratefully appreciated. Please cc me on any reply to faheem at email.unc.edu. Thanks in advance. Faheem.