[SciPy-user] SciPy-user Digest, Vol 53, Issue 28

Yennifer Santiago yennifersantiago at gmail.com
Wed Jan 16 17:39:27 EST 2008


Hello...
I need to Know where I can obtain information about the operation of
the Genetic Algorithms in SciPy. I'm looking for some tutorial about
it.

Yennifer Santiago

On 1/16/08, scipy-user-request at scipy.org <scipy-user-request at scipy.org> wrote:
> Send SciPy-user mailing list submissions to
> 	scipy-user at scipy.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://projects.scipy.org/mailman/listinfo/scipy-user
> or, via email, send a message with subject or body 'help' to
> 	scipy-user-request at scipy.org
>
> You can reach the person managing the list at
> 	scipy-user-owner at scipy.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of SciPy-user digest..."
>
>
> Today's Topics:
>
>    1. 3D (I'm not talking about rendering) ( Jos? Mar?a Garc?a P?rez )
>    2. Re: Bayes net question (Karl Young)
>    3. Re: Test failures with latest SVN (Nils Wagner)
>    4. Re: Memory leak in delaunay interpolator (Nils Wagner)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 16 Jan 2008 19:20:44 +0100
> From: " Jos? Mar?a Garc?a P?rez "	<josemaria.alkala at gmail.com>
> Subject: [SciPy-user] 3D (I'm not talking about rendering)
> To: scipy-user at scipy.org
> Message-ID:
> 	<a1d6dd760801161020n35f1650bk168e9ba7725bf4a7 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hello everybody,
> I use scipy to work with bigs datasets. For example, 300000 points. I want
> to do geometrical tasks with those points or lines. For example, I want to
> look all the points with the same geometrical position or with similar
> geometrical position.
>
> Althought it's possible to do that just using scipy, I'm looking for a
> package to do those tasks much more faster that what I get now.
>
> Besides I would like to do more geometrical things, like projecting or
> intersecting lines, ...
>
> Thanks a lot  in advance,
> Jose M.
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://projects.scipy.org/pipermail/scipy-user/attachments/20080116/6d4bfd37/attachment-0001.html
>
> ------------------------------
>
> Message: 2
> Date: Wed, 16 Jan 2008 10:14:33 -0800
> From: Karl Young <Karl.Young at ucsf.edu>
> Subject: Re: [SciPy-user] Bayes net question
> To: SciPy Users List <scipy-user at scipy.org>
> Message-ID: <478E4989.4080100 at ucsf.edu>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> David Warde-Farley wrote:
>
> >On 16-Jan-08, at 12:05 PM, Karl Young wrote:
> >
> >
> >
> >>I've looked at the documentation for that package (but refuse to go
> >>back
> >>to Matlab re. actually using it :-)) and it looks like it's quite a
> >>bit
> >>further along than OpenBayes re. options so does it seem like a
> >>consensus that we should wait for this to be settled before any
> >>decisions about incorporating Bayes nets ? As I mentioned before I'm
> >>willing to help (e.g. with a port) once a decision is reached re. the
> >>best approach.
> >>
> >>
> >
> >Likewise, I'd be willing to help with a port.
> >
> >I know that BNT includes code from other projects (for one thing the
> >IRLS implementation for optimizing the weights of a softmax from the
> >NetLab neural networks toolbox), so it may not be totally up to
> >Professor Murphy whether or not to dual-license the entire thing.
> >
> >
>
> Good point though I guess we could study which of that functionality
> could be replaced by existing Scipy bits and which might be reasonable
> to rewrite (particularly if there are more than one of us working on
> this), e.g. we might not need everything that's in the neural networks
> toolbox.
>
> --
>
> Karl Young
> Center for Imaging of Neurodegenerative Diseases, UCSF
> VA Medical Center (114M)              Phone:  (415) 221-4810 x3114  lab
>
> 4150 Clement Street                   FAX:    (415) 668-2864
> San Francisco, CA 94121               Email:  karl young at ucsf edu
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 16 Jan 2008 20:17:08 +0100
> From: "Nils Wagner" <nwagner at iam.uni-stuttgart.de>
> Subject: Re: [SciPy-user] Test failures with latest SVN
> To: SciPy Users List <scipy-user at scipy.org>
> Message-ID: <web-94835984 at uni-stuttgart.de>
> Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
>
> On Wed, 16 Jan 2008 11:24:36 +0000
>   Robin <robince at gmail.com> wrote:
> > Hi,
> >
> > I am using Mac OS X 10.5.1 and recently updated to the
> >latest svn
> > version. (an older version was already working ok on
> >leopard).
> > I installed nose by hand. However I get a lot of errors
> >in the tests.
> >
> > I have put the output here because it is quite long:
> > http://pastebin.com/m58c1f6af
> > Also at the end of the test there is a graphical window
> >with some
> > random text in it, so I have to press ctrl-c to get out
> >of the python
> > session.
>
> Did you activate sandbox.lobpcg ?
> A small test compares the spectrum computed by symeig
> and lobpcg. The spectra are depicted in a plot.
>
>
> >
> > I am not sure if this a mac issue or something wrong on
> >my system...
> >
> > Robin
> >
> Hi Robin,
>
> I have filed four tickets wrt recent test failures/errors.
>
> http://projects.scipy.org/scipy/scipy/ticket/588
> http://projects.scipy.org/scipy/scipy/ticket/587
> http://projects.scipy.org/scipy/scipy/ticket/586
> http://projects.scipy.org/scipy/scipy/ticket/584
>
> BTW, there is another typo in the test output.
>
>
> It should be
>
> Hilbert transform of periodic functions
>
> instead of
>
> Tilbert transform of periodic functions
>
>
> Cheers,
>
>            Nils
>
> ======================================================================
> ERROR: Test matrices giving some Nan generalized eigen
> values.
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py",
> line 156, in test_falker
>      if all(isfinite(res[:, i])):
> NameError: global name 'all' is not defined
>
> ======================================================================
> ERROR: Test singular pair
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py",
> line 132, in test_singular
>      if all(isfinite(res[:, i])):
> NameError: global name 'all' is not defined
>
> ======================================================================
> ERROR: Failure: ImportError (cannot import name _bspline)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/nose/loader.py",
> line 363, in loadTestsFromName
>      module = self.importer.importFromPath(
>    File
> "/usr/lib/python2.4/site-packages/nose/importer.py", line
> 39, in importFromPath
>      return self.importFromDir(dir_path, fqname)
>    File
> "/usr/lib/python2.4/site-packages/nose/importer.py", line
> 84, in importFromDir
>      mod = load_module(part_fqname, fh, filename, desc)
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/tests/test_bspline.py",
> line 9, in ?
>      import scipy.stats.models.bspline as B
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/bspline.py",
> line 23, in ?
>      from scipy.stats.models import _bspline
> ImportError: cannot import name _bspline
>
> ======================================================================
> ERROR: test_huber (test_scale.TestScale)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/tests/test_scale.py",
> line 35, in test_huber
>      m = scale.huber(X)
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/robust/scale.py",
> line 82, in __call__
>      for donothing in self:
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/robust/scale.py",
> line 102, in next
>      scale = N.sum(subset * (a - mu)**2, axis=self.axis) /
> (self.n * Huber.gamma - N.sum(1. - subset, axis=self.axis)
> * Huber.c**2)
>    File
> "/usr/lib/python2.4/site-packages/numpy/core/fromnumeric.py",
> line 866, in sum
>      return sum(axis, dtype, out)
> TypeError: only length-1 arrays can be converted to Python
> scalars
>
> ======================================================================
> ERROR: test_huberaxes (test_scale.TestScale)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/tests/test_scale.py",
> line 40, in test_huberaxes
>      m = scale.huber(X, axis=0)
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/robust/scale.py",
> line 82, in __call__
>      for donothing in self:
>    File
> "/usr/lib/python2.4/site-packages/scipy/stats/models/robust/scale.py",
> line 102, in next
>      scale = N.sum(subset * (a - mu)**2, axis=self.axis) /
> (self.n * Huber.gamma - N.sum(1. - subset, axis=self.axis)
> * Huber.c**2)
>    File
> "/usr/lib/python2.4/site-packages/numpy/core/fromnumeric.py",
> line 866, in sum
>      return sum(axis, dtype, out)
> TypeError: only length-1 arrays can be converted to Python
> scalars
>
> ======================================================================
> ERROR: Failure: ImportError (No module named convolve)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/nose/loader.py",
> line 363, in loadTestsFromName
>      module = self.importer.importFromPath(
>    File
> "/usr/lib/python2.4/site-packages/nose/importer.py", line
> 39, in importFromPath
>      return self.importFromDir(dir_path, fqname)
>    File
> "/usr/lib/python2.4/site-packages/nose/importer.py", line
> 84, in importFromDir
>      mod = load_module(part_fqname, fh, filename, desc)
>    File
> "/usr/lib/python2.4/site-packages/scipy/stsci/image/__init__.py",
> line 2, in ?
>      from _image import *
>    File
> "/usr/lib/python2.4/site-packages/scipy/stsci/image/_image.py",
> line 2, in ?
>      import convolve
> ImportError: No module named convolve
>
> ======================================================================
> ERROR: test_access_set_speed
> (test_scxx_sequence._TestSequenceBase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_sequence.py",
> line 162, in test_access_set_speed
>      a = self.seq_type([0]) * N
> TypeError: 'NoneType' object is not callable
>
> ======================================================================
> ERROR: test_access_speed
> (test_scxx_sequence._TestSequenceBase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_sequence.py",
> line 131, in test_access_speed
>      a = self.seq_type([0]) * N
> TypeError: 'NoneType' object is not callable
>
> ======================================================================
> ERROR: test_conversion
> (test_scxx_sequence._TestSequenceBase)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_sequence.py",
> line 28, in test_conversion
>      a = self.seq_type([1])
> TypeError: 'NoneType' object is not callable
>
> ======================================================================
> ERROR: Test the "count" method for lists.  We'll assume
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_sequence.py",
> line 97, in test_count
>      a = self.seq_type([1,2,'alpha',3.1416])
> TypeError: 'NoneType' object is not callable
>
> ======================================================================
> ERROR: Test the "in" method for lists.  We'll assume
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_sequence.py",
> line 44, in test_in
>      a = self.seq_type([1,2,'alpha',3.1416])
> TypeError: 'NoneType' object is not callable
>
> ======================================================================
> ERROR: no_test_no_check_return
> (test_wx_spec.TestWxConverter)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_wx_spec.py",
> line 104, in no_test_no_check_return
>      mod.compile()
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/ext_tools.py",
> line 365, in compile
>      verbose = verbose, **kw)
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/build_tools.py",
> line 271, in build_extension
>      setup(name = module_name, ext_modules =
> [ext],verbose=verb)
>    File
> "/usr/lib/python2.4/site-packages/numpy/distutils/core.py",
> line 178, in setup
>      return old_setup(**new_attr)
>    File "/usr/lib/python2.4/distutils/core.py", line 166,
> in setup
>      raise SystemExit, "error: " + str(msg)
> CompileError: error: Command "g++ -pthread
> -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mcpu=i686
> -fmessage-length=0 -g -fPIC
> -I/usr/lib/python2.4/site-packages/scipy/weave
> -I/usr/lib/python2.4/site-packages/scipy/weave/scxx
> -I/usr/lib/python2.4/site-packages/numpy/core/include
> -I/usr/include/python2.4 -c /home/nwagner/wx_return.cpp -o
> /tmp/nwagner/python24_intermediate/compiler_dc4fe17de7765fced0d869942e4ccabc/home/nwagner/wx_return.o"
> failed with exit status 1
>
> ======================================================================
> ERROR: test_var_in (test_wx_spec.TestWxConverter)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_wx_spec.py",
> line 63, in test_var_in
>      mod.compile()
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/ext_tools.py",
> line 365, in compile
>      verbose = verbose, **kw)
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/build_tools.py",
> line 271, in build_extension
>      setup(name = module_name, ext_modules =
> [ext],verbose=verb)
>    File
> "/usr/lib/python2.4/site-packages/numpy/distutils/core.py",
> line 178, in setup
>      return old_setup(**new_attr)
>    File "/usr/lib/python2.4/distutils/core.py", line 166,
> in setup
>      raise SystemExit, "error: " + str(msg)
> CompileError: error: Command "g++ -pthread
> -fno-strict-aliasing -DNDEBUG -O2 -march=i586 -mcpu=i686
> -fmessage-length=0 -g -fPIC
> -I/usr/lib/python2.4/site-packages/scipy/weave
> -I/usr/lib/python2.4/site-packages/scipy/weave/scxx
> -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2
> -I/usr/lib/glib/include
> -I/usr/lib/python2.4/site-packages/numpy/core/include
> -I/usr/include/python2.4 -c /home/nwagner/wx_var_in.cpp -o
> /tmp/nwagner/python24_intermediate/compiler_dc4fe17de7765fced0d869942e4ccabc/home/nwagner/wx_var_in.o
> -I/usr/lib/wx/include/gtk2-unicode-release-2.5
> -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
> -I/usr/lib/wx/include/gtk2-unicode-release-2.5
> -I/usr/include/wx-2.5 -DGTK_NO_CHECK_CASTS -D__WXGTK__
> -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" failed with exit
> status 1
>
> ======================================================================
> FAIL: test_imresize (test_pilutil.TestPILUtil)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/misc/tests/test_pilutil.py",
> line 24, in test_imresize
>      assert_equal(im1.shape,(11,22))
>    File
> "/usr/lib/python2.4/site-packages/numpy/testing/utils.py",
> line 137, in assert_equal
>      assert_equal(len(actual),len(desired),err_msg,verbose)
>    File
> "/usr/lib/python2.4/site-packages/numpy/testing/utils.py",
> line 145, in assert_equal
>      assert desired == actual, msg
> AssertionError:
> Items are not equal:
>   ACTUAL: 0
>   DESIRED: 2
>
> ======================================================================
> FAIL: Test generator for parametric tests
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/nose/case.py",
> line 203, in runTest
>      self.test(*self.arg)
>    File
> "/usr/lib/python2.4/site-packages/scipy/misc/tests/test_pilutil.py",
> line 36, in tst_fromimage
>      assert img.min() >= imin
> AssertionError
>
> ======================================================================
> FAIL: Test generator for parametric tests
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/nose/case.py",
> line 203, in runTest
>      self.test(*self.arg)
>    File
> "/usr/lib/python2.4/site-packages/scipy/misc/tests/test_pilutil.py",
> line 36, in tst_fromimage
>      assert img.min() >= imin
> AssertionError
>
> ======================================================================
> FAIL: Test generator for parametric tests
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File "/usr/lib/python2.4/site-packages/nose/case.py",
> line 203, in runTest
>      self.test(*self.arg)
>    File
> "/usr/lib/python2.4/site-packages/scipy/misc/tests/test_pilutil.py",
> line 36, in tst_fromimage
>      assert img.min() >= imin
> AssertionError
>
> ======================================================================
> FAIL: test_DAD (test_sa.TestSASolverPerformance)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/sandbox/multigrid/tests/test_sa.py",
> line 234, in test_DAD
>      assert(avg_convergence_ratio < 0.2)
> AssertionError
>
> ======================================================================
> FAIL: test_char_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 120, in test_char_fail
>      self.generic_get('return_val = a["c"];')
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_obj_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 147, in test_obj_fail
>      self.generic_get(code,['a'])
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_set_complex
> (test_scxx_object.TestObjectSetItemOpKey)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_object.py",
> line 865, in test_set_complex
>      assert_equal(sys.getrefcount(key),4) # should be 3
>    File
> "/usr/lib/python2.4/site-packages/numpy/testing/utils.py",
> line 145, in assert_equal
>      assert desired == actual, msg
> AssertionError:
> Items are not equal:
>   ACTUAL: 3
>   DESIRED: 4
>
> ======================================================================
> FAIL: test_char_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 120, in test_char_fail
>      self.generic_get('return_val = a["c"];')
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_obj_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 147, in test_obj_fail
>      self.generic_get(code,['a'])
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_set_complex
> (test_scxx_object.TestObjectSetItemOpKey)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_object.py",
> line 865, in test_set_complex
>      assert_equal(sys.getrefcount(key),4) # should be 3
>    File
> "/usr/lib/python2.4/site-packages/numpy/testing/utils.py",
> line 145, in assert_equal
>      assert desired == actual, msg
> AssertionError:
> Items are not equal:
>   ACTUAL: 3
>   DESIRED: 4
>
> ======================================================================
> FAIL: test_char_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 120, in test_char_fail
>      self.generic_get('return_val = a["c"];')
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_obj_fail (test_scxx_dict.TestDictGetItemOp)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 147, in test_obj_fail
>      self.generic_get(code,['a'])
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_dict.py",
> line 108, in generic_get
>      assert res == a['b']
> AssertionError
>
> ======================================================================
> FAIL: test_set_complex
> (test_scxx_object.TestObjectSetItemOpKey)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File
> "/usr/lib/python2.4/site-packages/scipy/weave/tests/test_scxx_object.py",
> line 865, in test_set_complex
>      assert_equal(sys.getrefcount(key),4) # should be 3
>    File
> "/usr/lib/python2.4/site-packages/numpy/testing/utils.py",
> line 145, in assert_equal
>      assert desired == actual, msg
> AssertionError:
> Items are not equal:
>   ACTUAL: 3
>   DESIRED: 4
>
> ----------------------------------------------------------------------
> Ran 2622 tests in 731.459s
>
> FAILED (failures=14, errors=13)
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 16 Jan 2008 20:40:33 +0100
> From: "Nils Wagner" <nwagner at iam.uni-stuttgart.de>
> Subject: Re: [SciPy-user] Memory leak in delaunay interpolator
> To: SciPy Users List <scipy-user at scipy.org>
> Message-ID: <web-94836659 at uni-stuttgart.de>
> Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
>
> On Wed, 16 Jan 2008 11:38:02 +0100
>   Rob Hetland <hetland at tamu.edu> wrote:
> >
> > I'm not sure who else uses the delaunay package (was in
> >
> > scipy.sandbox, now lives in scikits), but I find it
> >indispensable.
> > Today I found what appears to be a memory leak in the
> >interpolator
> > and extrapolator objects.  This simple code demonstrates
> >the leak:
> >
> >
> >
> > from scipy.sandbox import delaunay  # or wherever your
> >delaunay
> > package lives these days
> > from numpy.random import rand
> >
> > xi, yi = rand(2, 1000)
> > x, y = rand(2, 100)
> > tri = delaunay.Triangulation(xi, yi)
> >
> > for n in range(100000):
> >    interp = tri.nn_interpolator(rand(1000))
> >    z = interp(x, y)
> >
> >
> >
> > I tested this code on Mac OS X 10.4, and a recent
> >version of Ubuntu.
> > Both show memory usage increasing consistently through
> >the run.
> >
> > Also, while I am here, does anybody have any other
> >advice on 2D
> > interpolation?  3D?  This is something I need to do
> >often, and I am
> > still waiting for the perfect solution to come along.
> >
> > -Rob
> >
> > ----
> > Rob Hetland, Associate Professor
> > Dept. of Oceanography, Texas A&M University
> > http://pong.tamu.edu/~rob
> > phone: 979-458-0096, fax: 979-845-6331
> >
> >
> > _______________________________________________
> > SciPy-user mailing list
> > SciPy-user at scipy.org
> > http://projects.scipy.org/mailman/listinfo/scipy-user
>
> Hi Rob,
>
> I have installed delaunay from scratch.
> Your code produces a segfault here. I will file a ticket.
>
> from scikits import delaunay # or wherever your delaunay
> package lives these days
> from numpy.random import rand
>
> xi, yi = rand(2, 1000)
> x, y = rand(2, 100)
> tri = delaunay.Triangulation(xi, yi)
>
> for n in range(100000):
>      interp = tri.nn_interpolator(rand(1000))
>      z = interp(x, y)
>
> (gdb) run hetland.py
> Starting program: /usr/bin/python hetland.py
> [Thread debugging using libthread_db enabled]
> [New Thread 1077176000 (LWP 16333)]
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 1077176000 (LWP 16333)]
> 0x4045cfb0 in nn_interpolate_unstructured_method
> (self=0x0, args=0x1) at _delaunay.cpp:504
> 504             CLEANUP
> (gdb) bt
> #0  0x4045cfb0 in nn_interpolate_unstructured_method
> (self=0x0, args=0x1) at _delaunay.cpp:504
> #1  0x4007b583 in PyCFunction_Call () from
> /usr/lib/libpython2.4.so.1.0
> #2  0x400b2a91 in PyEval_EvalFrame () from
> /usr/lib/libpython2.4.so.1.0
> #3  0x400b4bc1 in PyEval_EvalCodeEx () from
> /usr/lib/libpython2.4.so.1.0
> #4  0x4006b13a in function_call () from
> /usr/lib/libpython2.4.so.1.0
> #5  0x40053c37 in PyObject_Call () from
> /usr/lib/libpython2.4.so.1.0
> #6  0x4005cedb in instancemethod_call () from
> /usr/lib/libpython2.4.so.1.0
> #7  0x40053c37 in PyObject_Call () from
> /usr/lib/libpython2.4.so.1.0
> #8  0x4008ec2c in slot_tp_call () from
> /usr/lib/libpython2.4.so.1.0
> #9  0x40053c37 in PyObject_Call () from
> /usr/lib/libpython2.4.so.1.0
> #10 0x400b1f37 in PyEval_EvalFrame () from
> /usr/lib/libpython2.4.so.1.0
> #11 0x400b4bc1 in PyEval_EvalCodeEx () from
> /usr/lib/libpython2.4.so.1.0
> #12 0x400b4e95 in PyEval_EvalCode () from
> /usr/lib/libpython2.4.so.1.0
> #13 0x400cf618 in run_node () from
> /usr/lib/libpython2.4.so.1.0
> #14 0x400d0db3 in PyRun_SimpleFileExFlags () from
> /usr/lib/libpython2.4.so.1.0
> #15 0x400d137a in PyRun_AnyFileExFlags () from
> /usr/lib/libpython2.4.so.1.0
> #16 0x400d750a in Py_Main () from
> /usr/lib/libpython2.4.so.1.0
> #17 0x0804871a in main (argc=1, argv=0x1) at
> ccpython.cc:10
>
> Cheers,
>            Nils
>
>
> ------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user
>
>
> End of SciPy-user Digest, Vol 53, Issue 28
> ******************************************
>



More information about the SciPy-User mailing list