Debian Bug report logs - #569008
python-scipy: scipy.stats.kde.gaussian_kde fails with non-obvious exception

version graph

Package: python-scipy; Maintainer for python-scipy is Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>; Source for python-scipy is src:python-scipy.

Reported by: Tuure Laurinolli <tuure.laurinolli@indagon.com>

Date: Tue, 9 Feb 2010 13:18:01 UTC

Severity: normal

Found in version python-scipy/0.7.0-2

Fixed in version python-scipy/0.9.0+dfsg1-1

Done: Varun Hiremath <varun@debian.org>

Bug is archived. No further changes may be made.

Forwarded to http://projects.scipy.org/scipy/ticket/1167

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#569008; Package python-scipy. (Tue, 09 Feb 2010 13:18:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tuure Laurinolli <tuure.laurinolli@indagon.com>:
New Bug report received and forwarded. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Tue, 09 Feb 2010 13:18:04 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Tuure Laurinolli <tuure.laurinolli@indagon.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: python-scipy: scipy.stats.kde.gaussian_kde fails with non-obvious exception
Date: Tue, 09 Feb 2010 14:43:20 +0200
Package: python-scipy
Version: 0.7.0-2+b1
Severity: normal


When single-element input is given to scipy.stats.kde.gaussian_kde, it
raises ValueError about infs or NaNs even if the input doesn't contain
any. If computing KDE from single-element input does not make sense, the
exception should report this.

Expected result (with two-element input):

% python -c 'from scipy.stats.kde import gaussian_kde; gaussian_kde([1,2])'
/usr/lib/python2.5/site-packages/scipy/stats/stats.py:1486: DeprecationWarning: scipy.stats.cov is deprecated; please update your code to use numpy.cov.
Please note that:
    - numpy.cov rowvar argument defaults to true, not false
    - numpy.cov bias argument defaults to false, not true

  """, DeprecationWarning)
/usr/lib/python2.5/site-packages/scipy/stats/stats.py:420: DeprecationWarning: scipy.stats.mean is deprecated; please update your code to use numpy.mean.
Please note that:
    - numpy.mean axis argument defaults to None, not 0
    - numpy.mean has a ddof argument to replace bias in a more general manner.
      scipy.stats.mean(a, bias=True) can be replaced by numpy.mean(x,
axis=0, ddof=1).
  axis=0, ddof=1).""", DeprecationWarning)

Actual result:

% python -c 'from scipy.stats.kde import gaussian_kde; gaussian_kde([1])'
/usr/lib/python2.5/site-packages/scipy/stats/stats.py:1486: DeprecationWarning: scipy.stats.cov is deprecated; please update your code to use numpy.cov.
Please note that:
    - numpy.cov rowvar argument defaults to true, not false
    - numpy.cov bias argument defaults to false, not true

  """, DeprecationWarning)
/usr/lib/python2.5/site-packages/scipy/stats/stats.py:420: DeprecationWarning: scipy.stats.mean is deprecated; please update your code to use numpy.mean.
Please note that:
    - numpy.mean axis argument defaults to None, not 0
    - numpy.mean has a ddof argument to replace bias in a more general manner.
      scipy.stats.mean(a, bias=True) can be replaced by numpy.mean(x,
axis=0, ddof=1).
  axis=0, ddof=1).""", DeprecationWarning)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.5/site-packages/scipy/stats/kde.py", line 81, in __init__
    self._compute_covariance()
  File "/usr/lib/python2.5/site-packages/scipy/stats/kde.py", line 334, in _compute_covariance
    self.inv_cov = linalg.inv(self.covariance)
  File "/usr/lib/python2.5/site-packages/scipy/linalg/basic.py", line 342, in inv
    a1 = asarray_chkfinite(a)
  File "/usr/lib/python2.5/site-packages/numpy/lib/function_base.py", line 705, in asarray_chkfinite
    raise ValueError, "array must not contain infs or NaNs"
ValueError: array must not contain infs or NaNs

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (700, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=fi_FI, LC_CTYPE=fi_FI (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-scipy depends on:
ii  libamd2.2.0                  1:3.4.0-1   approximate minimum degree orderin
ii  libblas3gf [libblas.so.3gf]  1.2-2       Basic Linear Algebra Subroutines 3
ii  libc6                        2.10.2-2    GNU C Library: Shared libraries
ii  libgcc1                      1:4.4.2-3   GCC support library
ii  libgfortran3                 4.4.2-3     Runtime library for GNU Fortran ap
ii  liblapack3gf [liblapack.so.3 3.2.1-2     library of linear algebra routines
ii  libstdc++6                   4.4.2-3     The GNU Standard C++ Library v3
ii  libumfpack5.4.0              1:3.4.0-1   sparse LU factorization library
ii  python                       2.5.4-5     An interactive high-level object-o
ii  python-central               0.6.14+nmu2 register and build utility for Pyt
ii  python-numpy                 1:1.3.0-3   Numerical Python adds a fast array

Versions of packages python-scipy recommends:
ii  g++ [c++-compiler]            4:4.3.4-1  The GNU C++ compiler
ii  g++-4.3 [c++-compiler]        4.3.4-6    The GNU C++ compiler

Versions of packages python-scipy suggests:
ii  python-profiler               2.5.2-1    deterministic profiling of any Pyt

-- no debconf information




Message sent on to Tuure Laurinolli <tuure.laurinolli@indagon.com>:
Bug#569008. (Mon, 05 Apr 2010 15:51:19 GMT) Full text and rfc822 format available.

Message #8 received at 569008-submitter@bugs.debian.org (full text, mbox):

From: Luca Falavigna <dktrkranz@debian.org>
To: 569008-submitter@bugs.debian.org
Subject: Re: python-scipy: scipy.stats.kde.gaussian_kde fails with non-obvious exception
Date: Mon, 5 Apr 2010 17:40:44 +0200
[Message part 1 (text/plain, inline)]
Hi!

Could you please check if it still happens with 0.7.1-1? Thanks!

-- 
  .''`.
 :  :' :   Luca Falavigna <dktrkranz@debian.org>
 `.  `'
   `-
[signature.asc (application/pgp-signature, attachment)]

Information stored :
Bug#569008; Package python-scipy. (Tue, 06 Apr 2010 10:33:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tuure Laurinolli <tuure.laurinolli@indagon.fi>:
Extra info received and filed, but not forwarded. (Tue, 06 Apr 2010 10:33:03 GMT) Full text and rfc822 format available.

Message #13 received at 569008-quiet@bugs.debian.org (full text, mbox):

From: Tuure Laurinolli <tuure.laurinolli@indagon.fi>
To: Luca Falavigna <dktrkranz@debian.org>, 569008-quiet@bugs.debian.org
Cc: 569008-submitter@bugs.debian.org
Subject: Re: Bug#569008: python-scipy: scipy.stats.kde.gaussian_kde fails with non-obvious exception
Date: Tue, 06 Apr 2010 13:01:28 +0300
On 2010-04-05 18:40, Luca Falavigna wrote:

> Could you please check if it still happens with 0.7.1-1? Thanks!

Yes, same behaviour as in the original report.




Message sent on to Tuure Laurinolli <tuure.laurinolli@indagon.com>:
Bug#569008. (Tue, 06 Apr 2010 10:33:05 GMT) Full text and rfc822 format available.

Set Bug forwarded-to-address to 'http://projects.scipy.org/scipy/ticket/1167'. Request was from Luca Falavigna <dktrkranz@debian.org> to control@bugs.debian.org. (Sun, 25 Apr 2010 17:51:03 GMT) Full text and rfc822 format available.

Added tag(s) pending. Request was from varun@users.alioth.debian.org to control@bugs.debian.org. (Thu, 07 Apr 2011 01:33:08 GMT) Full text and rfc822 format available.

Reply sent to Varun Hiremath <varun@debian.org>:
You have taken responsibility. (Thu, 07 Apr 2011 03:09:24 GMT) Full text and rfc822 format available.

Notification sent to Tuure Laurinolli <tuure.laurinolli@indagon.com>:
Bug acknowledged by developer. (Thu, 07 Apr 2011 03:09:33 GMT) Full text and rfc822 format available.

Message #25 received at 569008-close@bugs.debian.org (full text, mbox):

From: Varun Hiremath <varun@debian.org>
To: 569008-close@bugs.debian.org
Subject: Bug#569008: fixed in python-scipy 0.9.0+dfsg1-1
Date: Thu, 07 Apr 2011 03:04:50 +0000
Source: python-scipy
Source-Version: 0.9.0+dfsg1-1

We believe that the bug you reported is fixed in the latest version of
python-scipy, which is due to be installed in the Debian FTP archive:

python-scipy-dbg_0.9.0+dfsg1-1_amd64.deb
  to main/p/python-scipy/python-scipy-dbg_0.9.0+dfsg1-1_amd64.deb
python-scipy_0.9.0+dfsg1-1.debian.tar.gz
  to main/p/python-scipy/python-scipy_0.9.0+dfsg1-1.debian.tar.gz
python-scipy_0.9.0+dfsg1-1.dsc
  to main/p/python-scipy/python-scipy_0.9.0+dfsg1-1.dsc
python-scipy_0.9.0+dfsg1-1_amd64.deb
  to main/p/python-scipy/python-scipy_0.9.0+dfsg1-1_amd64.deb
python-scipy_0.9.0+dfsg1.orig.tar.gz
  to main/p/python-scipy/python-scipy_0.9.0+dfsg1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 569008@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Varun Hiremath <varun@debian.org> (supplier of updated python-scipy package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 06 Apr 2011 21:26:25 -0400
Source: python-scipy
Binary: python-scipy python-scipy-dbg
Architecture: source amd64
Version: 0.9.0+dfsg1-1
Distribution: unstable
Urgency: low
Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
Changed-By: Varun Hiremath <varun@debian.org>
Description: 
 python-scipy - scientific tools for Python
 python-scipy-dbg - scientific tools for Python - debugging symbols
Closes: 569008 579041 614407 617028
Changes: 
 python-scipy (0.9.0+dfsg1-1) unstable; urgency=low
 .
   * New upstream release (Closes: #614407, #579041, #569008)
   * Convert to dh_python2 (Closes: #617028)
Checksums-Sha1: 
 5e6f9056fceacf9fc7ca23941494df395d1347df 2365 python-scipy_0.9.0+dfsg1-1.dsc
 c7444495062a54511dce9dfc07a5daae145d9e4b 6223769 python-scipy_0.9.0+dfsg1.orig.tar.gz
 5bfa16f8bff23382292b8262f693ba7a1f544bdc 10612 python-scipy_0.9.0+dfsg1-1.debian.tar.gz
 f2f754df6b42bf71585a319d73419cfcddaa2277 11831140 python-scipy_0.9.0+dfsg1-1_amd64.deb
 dea202d6f10ac72b8b40bc4571bd6785a2512773 31006378 python-scipy-dbg_0.9.0+dfsg1-1_amd64.deb
Checksums-Sha256: 
 6f9d69db72b4f5af86d2641cf45e590fc9fe931b9c8e05527e581070ea406b06 2365 python-scipy_0.9.0+dfsg1-1.dsc
 996b9bd691dd81b7d8921f63e7e1109730af6d5dbaa498b35ec3f8e4b05554b7 6223769 python-scipy_0.9.0+dfsg1.orig.tar.gz
 5d67c640fed1a666d5e24b97b822cba58beffa6b7acd59d7f271f535b45c9c71 10612 python-scipy_0.9.0+dfsg1-1.debian.tar.gz
 6dccc12b851ebb9f1b1051a325aa49c3df294edb26a30d11ee4ba94708c19f75 11831140 python-scipy_0.9.0+dfsg1-1_amd64.deb
 0e785cecff888aa483ad04af94d76e4a8344accd69c0bf0a785d302c9d894c5e 31006378 python-scipy-dbg_0.9.0+dfsg1-1_amd64.deb
Files: 
 eaaeec9e7d1493c8899a1408f987c1bb 2365 python extra python-scipy_0.9.0+dfsg1-1.dsc
 edba232b5db5feae2beed36a04fd3480 6223769 python extra python-scipy_0.9.0+dfsg1.orig.tar.gz
 0053da3aa284771edea9822203775067 10612 python extra python-scipy_0.9.0+dfsg1-1.debian.tar.gz
 7a0a758a0101cb3ae9dde2c50bc1897b 11831140 python extra python-scipy_0.9.0+dfsg1-1_amd64.deb
 1ebbe056d0e43b74a2643f070375d98c 31006378 debug extra python-scipy-dbg_0.9.0+dfsg1-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBCgAGBQJNnSPHAAoJEHA3PPEpDbnOK9cP/0lg6Vet7P9UNq2QLe2hxd1d
oeqmVh2OlzqDaAqGagoood4HHgSGw5QBL8neu94wp30EFswYfY0+sKWPmVjwJTbv
FLlhEsa2fz+Tvbu4cCmi+yWPptaqZ+jzgiy/SwZJbjwaOr8hUDDKBkxj+JZ7x40S
FcsCn9f/E9T3AGz/K457qW2JgbeLYZTkMtrhPh+9z81fmJjN0Np9+BZ9Ga+7ZhO6
7gM4+1Lkv8AkASeQX51w+RuNoyzLd8VgWjf4wTT8gTrcEd1PlUmh6dv8XbWad74s
ZUQUypl2HrTGDil7CbFgJ1Qfx2PQOOu/rJ6WVy+HhMcfEll6CxUi0ElUMFWS7IcI
68d8DEtohKIDyclAVM71vLJzU00zhpQa3MQ04B0eJx+UIf1X4JdyKJ25QnzJrkzm
zYQILNxOZCcQT/mKau3SgLCQ97ks2aBfJ4Kpw3ZcF7eiaaRsSRoWR/wGqkGrw7iS
N0wKdCawryN4VnddMIAojcBCvngcO0AQEdmOtuWgz4UzPzculzCJpY7u8LfB3UxR
efw9SOhDrT3HuozMZ/2hh1SC6IfzCCAPTm4d5qlUp/P/+pDlTlxigiYsb2BNPdyI
vV1pNT+IJC4PiDYJB7i8v44cjwjmCROet0bY+w55gJMudtmduBekH1+lRQhe0nLj
N7c3ysI+x4XxcoLvqN7w
=VL74
-----END PGP SIGNATURE-----





Information forwarded to debian-bugs-dist@lists.debian.org, Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>:
Bug#569008; Package python-scipy. (Thu, 07 Apr 2011 06:54:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tuure Laurinolli <tuure.laurinolli@indagon.com>:
Extra info received and forwarded to list. Copy sent to Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>. (Thu, 07 Apr 2011 06:54:08 GMT) Full text and rfc822 format available.

Message #30 received at 569008@bugs.debian.org (full text, mbox):

From: Tuure Laurinolli <tuure.laurinolli@indagon.com>
To: 569008@bugs.debian.org
Subject: Re: Bug#569008 closed by Varun Hiremath <varun@debian.org> (Bug#569008: fixed in python-scipy 0.9.0+dfsg1-1)
Date: Thu, 07 Apr 2011 09:03:12 +0300
On 2011-04-07 06:09, Debian Bug Tracking System wrote:
> This is an automatic notification regarding your Bug report
> which was filed against the python-scipy package:
>
> #569008: python-scipy: scipy.stats.kde.gaussian_kde fails with non-obvious exception
>
> It has been closed by Varun Hiremath <varun@debian.org>.
>
> Their explanation is attached below along with your original report.
> If this explanation is unsatisfactory and you have not received a
> better one in a separate message then please contact Varun Hiremath <varun@debian.org> by
> replying to this email.
>
Hello,

It appears that with upstream version 0.9.0 the bug is not fixed:

[9:01:09][tazle@orn][~/unsafe/pythons]% ./scipytest/bin/python -c 'from
scipy.stats.kde import gaussian_kde; gaussian_kde([1])'
Warning: invalid value encountered in divide
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File
"/home/tazle/unsafe/pythons/scipytest/lib/python2.5/site-packages/scipy/stats/kde.py",
line 88, in __init__
    self._compute_covariance()
  File
"/home/tazle/unsafe/pythons/scipytest/lib/python2.5/site-packages/scipy/stats/kde.py",
line 341, in _compute_covariance
    self.inv_cov = linalg.inv(self.covariance)
  File
"/home/tazle/unsafe/pythons/scipytest/lib/python2.5/site-packages/scipy/linalg/basic.py",
line 285, in inv
    a1 = asarray_chkfinite(a)
  File
"/home/tazle/unsafe/pythons/scipytest/lib/python2.5/site-packages/numpy/lib/function_base.py",
line 547, in asarray_chkfinite
    "array must not contain infs or NaNs")
ValueError: array must not contain infs or NaNs

I did not test with the actual Debian package, since I do not have
unstable installation around. However, this should not be important,
since the changelog indicates that upstream changes are what should
close #569008.





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Sun, 22 May 2011 07:32:46 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 18:15:56 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.