Robert Kern | 1 Jul 2006 06:54
Picon
Gravatar

Mail lists for Trac tickets and SVN checkins

We now have mailing lists set up to receive notifications of changes to Trac
tickets and SVN checkins for both NumPy and SciPy. We do not have Gmane gateways
for them, yet.

    http://www.scipy.org/Mailing_Lists

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco
Nils Wagner | 1 Jul 2006 10:53
Picon

iterative.py AttributeError: 'module' object has no attribute 'ArrayType'

     x0,info = linalg.cgs(A,r)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/linalg/iterative.py", 
line 507, in cgs
     matvec = get_matvec(A)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/linalg/iterative.py", 
line 38, in __init__
     if isinstance(obj, sb.ArrayType):
AttributeError: 'module' object has no attribute 
'ArrayType'
>>> A
<4x4 sparse matrix of type '<type 'float64scalar'>'
         with 4 stored elements (space for 100)
         in Compressed Sparse Column format>
>>> r
array([  7.80423197e-01,   7.08887770e-04, 
  2.48475465e-01,
          8.27064601e-02])
Stefan van der Walt | 1 Jul 2006 12:19
Picon
Picon
Favicon

Re: iterative.py AttributeError: 'module' object has no attribute 'ArrayType'

On Sat, Jul 01, 2006 at 10:53:45AM +0200, Nils Wagner wrote:
>      x0,info = linalg.cgs(A,r)
>    File 
> "/usr/local/lib/python2.4/site-packages/scipy/linalg/iterative.py", 
> line 507, in cgs
>      matvec = get_matvec(A)
>    File 
> "/usr/local/lib/python2.4/site-packages/scipy/linalg/iterative.py", 
> line 38, in __init__
>      if isinstance(obj, sb.ArrayType):
> AttributeError: 'module' object has no attribute 
> 'ArrayType'
> >>> A
> <4x4 sparse matrix of type '<type 'float64scalar'>'
>          with 4 stored elements (space for 100)
>          in Compressed Sparse Column format>
> >>> r
> array([  7.80423197e-01,   7.08887770e-04, 
>   2.48475465e-01,
>           8.27064601e-02])

This was fixed on 28/06.

Stéfan
Robert Kern | 3 Jul 2006 21:31
Picon
Gravatar

Re: A couple problems of stats.poisson.pmf(k,mu)

Patrick Marks wrote:
> Should i make a ticket in trac for this?

Yes, please.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco
Patrick Marks | 3 Jul 2006 21:24
Picon

A couple problems of stats.poisson.pmf(k,mu)

Hi,
I've come across a couple problems in stats.poisson.pmf:

In [1]: from scipy.stats import *
In [2]: from scipy import special
In [3]: from numpy import asarray, exp

In [4]: poisson.pmf(10,10)
Out[4]: array(-0.026867175591182967)  # Negative PMF value!

In [5]: 10**10 * exp(-10) / asarray(special.gamma(11))
Out[5]: 0.1251100357211333

In [6]: poisson.pmf(10,10.0)
Out[6]: array(0.1251100357211333) # OK when mu is not an integer

In [7]: poisson.pmf(150,150.0)
Out[7]: array(1.#INF)   # Some sort of arithmetic overflow

The overflow could be avoided by computing the PMF in log space:
>poisson_gen._pmf(self, k, mu):
>   logPk = k * log(mu) - mu - arr(special.gammaln(k+1))
>    return exp(logPk)
which works to much higher numbers, and has a fractional deviation of
<10e-13 and typically == 0.0  from the current implementation in my
tests.

I'm not sure why the pmf is wrong when mu is an integer, although i
guess it's an easy fix.
Should i make a ticket in trac for this?
(Continue reading)

Nils Wagner | 5 Jul 2006 14:59
Picon

Bug in scipy.special.jv

I didn't expect nan for small arguments.

 >>> scipy.__version__
'0.5.0.2034'
 >>> special.jv(2./3,1.e-8)
3.2390285067614573e-06
 >>> special.jv(2./3,1.e-9)
6.9782753769690383e-07
 >>> special.jv(2./3,1.e-10)
nan
 >>> special.jv(2./3,0.0)
0.0

Nils
Nils Wagner | 5 Jul 2006 20:49
Picon

Errors and failures

A short bug report wrt to latest svn numpy/scipy

>>> scipy.__version__
'0.5.0.2041'
>>> numpy.__version__
'0.9.9.2735'

numpy.test(1,10)

======================================================================
ERROR: check_basic 
(numpy.core.tests.test_defmatrix.test_algebra)
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/lib/python2.4/site-packages/numpy/core/tests/test_defmatrix.py", 
line 125, in check_basic
     Ainv = linalg.inv(A)
   File 
"/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", 
line 122, in inv
     return wrap(solve(a, identity(a.shape[0])))
   File 
"/usr/lib/python2.4/site-packages/numpy/linalg/linalg.py", 
line 109, in solve
     results = lapack_routine(n_eq, n_rhs, a, n_eq, 
pivots, b, n_eq, 0)
LapackError: Parameter ipiv is not of type PyArray_INT in 
lapack_lite.dgesv

(Continue reading)

Robert Kern | 5 Jul 2006 21:09
Picon
Gravatar

Re: Errors and failures

Nils Wagner wrote:
> A short bug report wrt to latest svn numpy/scipy

Make tickets instead of posting here. Only post here if you have something 
substantive to discuss.

--

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco
Bryce Hendrix | 6 Jul 2006 01:58

ANN: Python Enthought Edition Version 1.0.0.beta3 Released

Enthought is pleased to announce the release of Python Enthought Edition Version 1.0.0.beta3 (http://code.enthought.com/enthon/) -- a python distribution for Windows.

1.0.0.beta3 Release Notes:
--------------------
Version 1.0.0.beta3 of Python Enthought Edition is the first version based on Python 2.4.3 and includes updates to nearly every package. This is the third and (hopefully) last beta release.

This release includes version 1.0.8 of the Enthought Tool Suite (ETS) Package and bug fixes-- you can look at the release notes for this ETS version here:

http://svn.enthought.com/downloads/enthought/changelog-release.1.0.8.html



About Python Enthought Edition:
-------------------------------
Python 2.4.3, Enthought Edition is a kitchen-sink-included Python distribution for Windows including the following packages out of the box:

Numeric
SciPy
IPython
Enthought Tool Suite
wxPython
PIL
mingw
f2py
MayaVi
Scientific Python
VTK
and many more...

More information is available about all Open Source code written and released by Enthought, Inc. at http://code.enthought.com


_______________________________________________
Scipy-dev mailing list
Scipy-dev <at> scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-dev
izak marais | 6 Jul 2006 15:51
Picon
Favicon

BUG: Memory leak in Numpy

Hi

I'm a new scipy and numpy user, so I don't know if this is the right mailing list to post numpy bugs to or what additional info you'll need, but I have code that leaks memory when accessing a numpy array inside a while loop.

Here is the script (note that I have spent a great deal of time to isolate the problem to this piece of code, because I worried it might have been my code that's buggy. Therefore the script doesn't actually do anything useful in its isolated state).

def grow_region(image, start):
    import numpy as N     #--------> numpy causes leak
    test_array = N.zeros((316, 316), N.uint8)
    #import Numeric as N2   #--------> Numeric works fine
    #test_array = N2.zeros((316, 316), N2.UInt8)
    print test_array
    remaining_area = 316**2
    print 'Before while loop. press enter to continue'
    raw_input()
   
    while (remaining_area>1):
        remaining_area -=1
        for dr in [-1, 0, 1]:
           for dc in [-1, 0, 1]:
                r = 157 +dr                   
                c =  157 + dc               
        #        test_array[r, c] = 1       #--------> NO leak
                if test_array[r,c] == 0:    #--------> causes leak
                    pass
        #         if test_array[157,157] == 0: #--------> NO leak
        #            pass
        #        test = test_array[r,c]           #--------> causes leak


#test
grow_region(1,1)


I run it on windows XP. The numpy.test(level=1) test executes correctly. I can see it leaks memory by watching the memory usage in the task list. The version/install file of Python  is 'python-2.4.2.msi' and numpy is 'numpy-0.9.8.win32-py2.4.exe'.

Let me know if you need extra info on my setup and how I shoud retrieve it (if it is  non-trivial)

Izak

Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail Beta.
_______________________________________________
Scipy-dev mailing list
Scipy-dev <at> scipy.org
http://projects.scipy.org/mailman/listinfo/scipy-dev

Gmane