From ralf.gommers at googlemail.com Tue Nov 1 13:45:44 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Tue, 1 Nov 2011 18:45:44 +0100 Subject: [SciPy-Dev] scipy 0.10.0 release schedule update In-Reply-To: References: Message-ID: On Tue, Nov 1, 2011 at 2:07 AM, wrote: > On Mon, Oct 31, 2011 at 2:25 PM, Ralf Gommers > wrote: > > > > > > On Mon, Oct 31, 2011 at 7:46 AM, Matthew Brett > > wrote: > >> > >> Hi, > >> > >> On Sun, Oct 30, 2011 at 3:56 PM, Ralf Gommers > >> wrote: > >> > > >> > > >> > On Sun, Oct 30, 2011 at 11:22 PM, Matthew Brett > >> > > >> > wrote: > >> >> > >> >> Hi, > >> >> > >> >> On Sun, Oct 30, 2011 at 2:31 PM, Ralf Gommers > >> >> wrote: > >> >> > > >> >> > Ralf > >> >> > >> >> It's just a one-liner fix to the compilation for cython 0.15, as far > >> >> as I can see: > >> > > >> > That's good news. > >> >> > >> >> diff --git a/scipy/io/matlab/mio5_utils.pyx > >> >> b/scipy/io/matlab/mio5_utils.pyx > >> >> index cb15a00..1604a61 100644 > >> >> --- a/scipy/io/matlab/mio5_utils.pyx > >> >> +++ b/scipy/io/matlab/mio5_utils.pyx > >> >> @@ -169,7 +169,7 @@ cdef class VarReader5: > >> >> * mat_dtype (bool) > >> >> * squeeze_me (bool) > >> >> """ > >> >> - def __new__(self, preader): > >> >> + def __cinit__(self, preader): > >> >> byte_order = preader.byte_order > >> >> self.is_swapped = byte_order == swapped_code > >> >> if self.is_swapped: > >> >> > >> >> Do you want me to build the c files with Cython 0.15 as well? > >> > > >> > Either way is fine. All Cython files should be regenerated in any case > >> > with > >> > this fix included: > >> > > >> > > https://github.com/cython/cython/commit/0443ad3d55f0a4762d4009bc606cb98ee4f4a1d6 > >> > >> Maybe I'll leave the building to you then - so we can make sure they > >> all get built right? > >> > >> I'll just submit the thing above as a tiny pull request. as I believe > >> it has no functional consequences. > >> > > Sounds good. > > What happened to the bfgs endless loop? I don't find a pull request or > information anymore. > https://github.com/scipy/scipy/pull/96 > It would be nice to have it in the next release. > > That's fine with me. Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From antoine.levitt at gmail.com Thu Nov 3 05:59:56 2011 From: antoine.levitt at gmail.com (Antoine Levitt) Date: Thu, 03 Nov 2011 10:59:56 +0100 Subject: [SciPy-Dev] 3D Meshgrid Message-ID: <87ipn1le5f.fsf@gmail.com> Hi, Could meshgrid be extended to support 3D grids? It's a pretty natural use case, and would bring it closer to matlab. There's some discussion at http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d Antoine From Per.Brodtkorb at ffi.no Thu Nov 3 07:57:54 2011 From: Per.Brodtkorb at ffi.no (Per.Brodtkorb at ffi.no) Date: Thu, 3 Nov 2011 12:57:54 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: <87ipn1le5f.fsf@gmail.com> References: <87ipn1le5f.fsf@gmail.com> Message-ID: <1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no> There is a ticket for this in numpy: http://projects.scipy.org/numpy/ticket/966 that needs a decision. Per A. Brodtkorb -----Opprinnelig melding----- Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Antoine Levitt Sendt: 3. november 2011 11:00 Til: scipy-dev at scipy.org Emne: [SciPy-Dev] 3D Meshgrid Hi, Could meshgrid be extended to support 3D grids? It's a pretty natural use case, and would bring it closer to matlab. There's some discussion at http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d Antoine _______________________________________________ SciPy-Dev mailing list SciPy-Dev at scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev From antoine.levitt at gmail.com Thu Nov 3 08:28:33 2011 From: antoine.levitt at gmail.com (Antoine Levitt) Date: Thu, 03 Nov 2011 13:28:33 +0100 Subject: [SciPy-Dev] 3D Meshgrid References: <87ipn1le5f.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no> Message-ID: <871utpl79q.fsf@gmail.com> The version in scitools looks consistent with numpy, compatible with the current API, and useful (in the common use case of a 3D grid, or a rectangular grid with irregular spacing, mgrid and ogrid are not enough) Could someone take a look at it? 03/11/11 12:57, Per.Brodtkorb at ffi.no > There is a ticket for this in numpy: > > http://projects.scipy.org/numpy/ticket/966 > > that needs a decision. > > Per A. Brodtkorb > > -----Opprinnelig melding----- > Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Antoine Levitt > Sendt: 3. november 2011 11:00 > Til: scipy-dev at scipy.org > Emne: [SciPy-Dev] 3D Meshgrid > > Hi, > > Could meshgrid be extended to support 3D grids? It's a pretty natural > use case, and would bring it closer to matlab. > > There's some discussion at > http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d > > Antoine > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev From ralf.gommers at googlemail.com Sat Nov 5 14:29:46 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Sat, 5 Nov 2011 19:29:46 +0100 Subject: [SciPy-Dev] ANN: scipy 0.10 release candidate 1 Message-ID: Hi all, I am pleased to announce the availability of the first release release of SciPy 0.10.0. For this release over a 100 tickets and pull requests have been closed, and many new features have been added. Some of the highlights are: - support for Bento as a build system for scipy - generalized and shift-invert eigenvalue problems in sparse.linalg - addition of discrete-time linear systems in the signal module Sources and binaries can be found at http://sourceforge.net/projects/scipy/files/scipy/0.10.0rc1/, release notes are copied below. Please try this release and report problems on the mailing list. Note: one problem with Python 2.5 (syntax) was discovered after tagging the release, it's fixed in the 0.10.x branch already so no need to report that one. Cheers, Ralf ========================== SciPy 0.10.0 Release Notes ========================== .. note:: Scipy 0.10.0 is not released yet! .. contents:: SciPy 0.10.0 is the culmination of 8 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a limited number of deprecations and backwards-incompatible changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Moreover, our development attention will now shift to bug-fix releases on the 0.10.x branch, and on adding new features on the development master branch. Release highlights: - Support for Bento as optional build system. - Support for generalized eigenvalue problems, and all shift-invert modes available in ARPACK. This release requires Python 2.4-2.7 or 3.1- and NumPy 1.5 or greater. New features ============ Bento: new optional build system -------------------------------- Scipy can now be built with `Bento `_. Bento has some nice features like parallel builds and partial rebuilds, that are not possible with the default build system (distutils). For usage instructions see BENTO_BUILD.txt in the scipy top-level directory. Currently Scipy has three build systems, distutils, numscons and bento. Numscons is deprecated and is planned and will likely be removed in the next release. Generalized and shift-invert eigenvalue problems in ``scipy.sparse.linalg`` --------------------------------------------------------------------------- The sparse eigenvalue problem solver functions ``scipy.sparse.eigs/eigh`` now support generalized eigenvalue problems, and all shift-invert modes available in ARPACK. Discrete-Time Linear Systems (``scipy.signal``) ----------------------------------------------- Support for simulating discrete-time linear systems, including ``scipy.signal.dlsim``, ``scipy.signal.dimpulse``, and ``scipy.signal.dstep``, has been added to SciPy. Conversion of linear systems from continuous-time to discrete-time representations is also present via the ``scipy.signal.cont2discrete`` function. Enhancements to ``scipy.signal`` -------------------------------- A Lomb-Scargle periodogram can now be computed with the new function ``scipy.signal.lombscargle``. The forward-backward filter function ``scipy.signal.filtfilt`` can now filter the data in a given axis of an n-dimensional numpy array. (Previously it only handled a 1-dimensional array.) Options have been added to allow more control over how the data is extended before filtering. FIR filter design with ``scipy.signal.firwin2`` now has options to create filters of type III (zero at zero and Nyquist frequencies) and IV (zero at zero frequency). Additional decomposition options (``scipy.linalg``) --------------------------------------------------- A sort keyword has been added to the Schur decomposition routine (``scipy.linalg.schur``) to allow the sorting of eigenvalues in the resultant Schur form. Additional special matrices (``scipy.linalg``) ---------------------------------------------- The functions ``hilbert`` and ``invhilbert`` were added to ``scipy.linalg``. Enhancements to ``scipy.stats`` ------------------------------- * The *one-sided form* of Fisher's exact test is now also implemented in ``stats.fisher_exact``. * The function ``stats.chi2_contingency`` for computing the chi-square test of independence of factors in a contingency table has been added, along with the related utility functions ``stats.contingency.margins`` and ``stats.contingency.expected_freq``. Basic support for Harwell-Boeing file format for sparse matrices ---------------------------------------------------------------- Both read and write are support through a simple function-based API, as well as a more complete API to control number format. The functions may be found in scipy.sparse.io. The following features are supported: * Read and write sparse matrices in the CSC format * Only real, symmetric, assembled matrix are supported (RUA format) Deprecated features =================== ``scipy.maxentropy`` -------------------- The maxentropy module is unmaintained, rarely used and has not been functioning well for several releases. Therefore it has been deprecated for this release, and will be removed for scipy 0.11. Logistic regression in scikits.learn is a good alternative for this functionality. The ``scipy.maxentropy.logsumexp`` function has been moved to ``scipy.misc``. ``scipy.lib.blas`` ------------------ There are similar BLAS wrappers in ``scipy.linalg`` and ``scipy.lib``. These have now been consolidated as ``scipy.linalg.blas``, and ``scipy.lib.blas`` is deprecated. Numscons build system --------------------- The numscons build system is being replaced by Bento, and will be removed in one of the next scipy releases. Backwards-incompatible changes ============================== The deprecated name `invnorm` was removed from ``scipy.stats.distributions``, this distribution is available as `invgauss`. The following deprecated nonlinear solvers from ``scipy.optimize`` have been removed:: - ``broyden_modified`` (bad performance) - ``broyden1_modified`` (bad performance) - ``broyden_generalized`` (equivalent to ``anderson``) - ``anderson2`` (equivalent to ``anderson``) - ``broyden3`` (obsoleted by new limited-memory broyden methods) - ``vackar`` (renamed to ``diagbroyden``) Other changes ============= ``scipy.constants`` has been updated with the CODATA 2010 constants. ``__all__`` dicts have been added to all modules, which has cleaned up the namespaces (particularly useful for interactive work). An API section has been added to the documentation, giving recommended import guidelines and specifying which submodules are public and which aren't. Authors ======= This release contains work by the following people (contributed at least one patch to this release, names in alphabetical order): * Jeff Armstrong + * Matthew Brett * Lars Buitinck + * David Cournapeau * FI$H 2000 + * Michael McNeil Forbes + * Matty G + * Christoph Gohlke * Ralf Gommers * Yaroslav Halchenko * Charles Harris * Thouis (Ray) Jones + * Chris Jordan-Squire + * Robert Kern * Chris Lasher + * Wes McKinney + * Travis Oliphant * Fabian Pedregosa * Josef Perktold * Thomas Robitaille + * Pim Schellart + * Anthony Scopatz + * Skipper Seabold + * Fazlul Shahriar + * David Simcha + * Scott Sinclair + * Andrey Smirnov + * Collin RM Stocks + * Martin Teichmann + * Jake Vanderplas + * Ga?l Varoquaux + * Pauli Virtanen * Stefan van der Walt * Warren Weckesser * Mark Wiebe + A total of 35 people contributed to this release. People with a "+" by their names contributed a patch for the first time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Sat Nov 5 14:40:20 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Sat, 5 Nov 2011 19:40:20 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 Message-ID: Hi, There's a problem with schur(.., sort='lhp') under Python 2.5 that seems to be related to the Lapack function gees: http://projects.scipy.org/scipy/ticket/1555 It would be great if someone could have a look at this for the 0.10.0 release, but if not I'll mark it as a knownfailure because it's not a regression. Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsouthey at gmail.com Sat Nov 5 22:26:51 2011 From: bsouthey at gmail.com (Bruce Southey) Date: Sat, 5 Nov 2011 21:26:51 -0500 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers wrote: > Hi, > > There's a problem with schur(.., sort='lhp') under Python 2.5 that seems to > be related to the Lapack function gees: > http://projects.scipy.org/scipy/ticket/1555 > > It would be great if someone could have a look at this for the 0.10.0 > release, but if not I'll mark it as a knownfailure because it's not a > regression. > > Ralf > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > I have only tested the RC on my 32-bit Windows install using the provided binary. I get the test_decomp.TestSchur and syntax error in test_distributions.py. But buried in the test output (when run within command line Python but not under IDLE) is this: "capi_return is NULL Call-back cb_dselect_in_dgees__user__routines failed." This also appears with the current dev version under Linux. Bruce $ python2.5 test_decomp.py ................................................................................................................................................capi_return is NULL Call-back cb_dselect_in_dgees__user__routines failed. E.....................................................................................................................................E ====================================================================== ERROR: test_sort (test_decomp.TestSchur) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", line 1498, in test_sort s,u,sdim = schur(a,sort='lhp') File "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", line 118, in schur sort_t=sort_t) File "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", line 106, in sfunction = lambda x: (x.real < 0.0) AttributeError: 'float' object has no attribute 'real' ====================================================================== ERROR: test_decomp.test_lapack_misaligned ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.5/site-packages/nose/case.py", line 186, in runTest self.test(*self.arg) File "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", line 213, in knownfailer raise KnownFailureTest, msg KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. ---------------------------------------------------------------------- Windows errors: ====================================================================== ERROR: test_sort (test_decomp.TestSchur) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\Python25\Lib\site-packages\scipy\linalg\tests\test_decomp.py", line 1230, in test_sort s,u,sdim = schur(a,sort='lhp') File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", line 118, in schur sort_t=sort_t) File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", line 106, in sfunction = lambda x: (x.real < 0.0) AttributeError: 'float' object has no attribute 'real' ====================================================================== ERROR: Failure: SyntaxError (invalid syntax (test_distributions.py, line 739)) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\loader.py", line 390, in loadTestsFromName addr.filename, addr.module) File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "C:\Python25\lib\site-packages\scipy\stats\tests\test_distributions.py", line 739 x = stats.lognorm.rvs(*true, size=100) ^ SyntaxError: invalid syntax ---------------------------------------------------------------------- From josef.pktd at gmail.com Sat Nov 5 23:08:04 2011 From: josef.pktd at gmail.com (josef.pktd at gmail.com) Date: Sat, 5 Nov 2011 23:08:04 -0400 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Sat, Nov 5, 2011 at 10:26 PM, Bruce Southey wrote: > On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers > wrote: >> Hi, >> >> There's a problem with schur(.., sort='lhp') under Python 2.5 that seems to >> be related to the Lapack function gees: >> http://projects.scipy.org/scipy/ticket/1555 >> >> It would be great if someone could have a look at this for the 0.10.0 >> release, but if not I'll mark it as a knownfailure because it's not a >> regression. >> >> Ralf >> >> >> _______________________________________________ >> SciPy-Dev mailing list >> SciPy-Dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/scipy-dev >> >> > I have only tested the RC on my 32-bit Windows install using the > provided binary. > I get the test_decomp.TestSchur and syntax error in test_distributions.py. > > But buried in the test output (when run within command line Python but > not under IDLE) is this: > "capi_return is NULL > Call-back cb_dselect_in_dgees__user__routines failed." > > This also appears with the current dev version under Linux. > > Bruce > > $ python2.5 test_decomp.py > ................................................................................................................................................capi_return > is NULL > Call-back cb_dselect_in_dgees__user__routines failed. > E.....................................................................................................................................E > ====================================================================== > ERROR: test_sort (test_decomp.TestSchur) > ---------------------------------------------------------------------- > Traceback (most recent call last): > ?File "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", > line 1498, in test_sort > ? ?s,u,sdim = schur(a,sort='lhp') > ?File "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > line 118, in schur > ? ?sort_t=sort_t) > ?File "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > line 106, in > ? ?sfunction = lambda x: (x.real < 0.0) > AttributeError: 'float' object has no attribute 'real' > > ====================================================================== > ERROR: test_decomp.test_lapack_misaligned > ---------------------------------------------------------------------- > Traceback (most recent call last): > ?File "/usr/local/lib/python2.5/site-packages/nose/case.py", line > 186, in runTest > ? ?self.test(*self.arg) > ?File "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", > line 213, in knownfailer > ? ?raise KnownFailureTest, msg > KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. > > ---------------------------------------------------------------------- > > Windows errors: > ====================================================================== > ERROR: test_sort (test_decomp.TestSchur) > ---------------------------------------------------------------------- > Traceback (most recent call last): > ?File "C:\Python25\Lib\site-packages\scipy\linalg\tests\test_decomp.py", > line 1230, in test_sort > ? ?s,u,sdim = schur(a,sort='lhp') > ?File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", > line 118, in schur > ? ?sort_t=sort_t) > ?File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", > line 106, in > ? ?sfunction = lambda x: (x.real < 0.0) > AttributeError: 'float' object has no attribute 'real' > > ====================================================================== > ERROR: Failure: SyntaxError (invalid syntax (test_distributions.py, line 739)) > ---------------------------------------------------------------------- > Traceback (most recent call last): > ?File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\loader.py", > line 390, in loadTestsFromName > ? ?addr.filename, addr.module) > ?File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", > line 39, in importFromPath > ? ?return self.importFromDir(dir_path, fqname) > ?File "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", > line 86, in importFromDir > ? ?mod = load_module(part_fqname, fh, filename, desc) > ?File "C:\Python25\lib\site-packages\scipy\stats\tests\test_distributions.py", > line 739 > ? ?x = stats.lognorm.rvs(*true, size=100) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?^ > SyntaxError: invalid syntax This one is my mistake, I only tested with python 2.7, and I get used to newer syntax. Josef > > ---------------------------------------------------------------------- > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > From ralf.gommers at googlemail.com Sun Nov 6 03:19:57 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Sun, 6 Nov 2011 09:19:57 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Sun, Nov 6, 2011 at 4:08 AM, wrote: > On Sat, Nov 5, 2011 at 10:26 PM, Bruce Southey wrote: > > On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers > > wrote: > >> Hi, > >> > >> There's a problem with schur(.., sort='lhp') under Python 2.5 that > seems to > >> be related to the Lapack function gees: > >> http://projects.scipy.org/scipy/ticket/1555 > >> > >> It would be great if someone could have a look at this for the 0.10.0 > >> release, but if not I'll mark it as a knownfailure because it's not a > >> regression. > >> > >> Ralf > >> > >> > >> _______________________________________________ > >> SciPy-Dev mailing list > >> SciPy-Dev at scipy.org > >> http://mail.scipy.org/mailman/listinfo/scipy-dev > >> > >> > > I have only tested the RC on my 32-bit Windows install using the > > provided binary. > > I get the test_decomp.TestSchur and syntax error in > test_distributions.py. > > > > But buried in the test output (when run within command line Python but > > not under IDLE) is this: > > "capi_return is NULL > > Call-back cb_dselect_in_dgees__user__routines failed." > > > > This also appears with the current dev version under Linux. > > > > Bruce > > > > $ python2.5 test_decomp.py > > > ................................................................................................................................................capi_return > > is NULL > > Call-back cb_dselect_in_dgees__user__routines failed. > > > E.....................................................................................................................................E > > ====================================================================== > > ERROR: test_sort (test_decomp.TestSchur) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File > "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", > > line 1498, in test_sort > > s,u,sdim = schur(a,sort='lhp') > > File > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > > line 118, in schur > > sort_t=sort_t) > > File > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > > line 106, in > > sfunction = lambda x: (x.real < 0.0) > > AttributeError: 'float' object has no attribute 'real' > > > > ====================================================================== > > ERROR: test_decomp.test_lapack_misaligned > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File "/usr/local/lib/python2.5/site-packages/nose/case.py", line > > 186, in runTest > > self.test(*self.arg) > > File > "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", > > line 213, in knownfailer > > raise KnownFailureTest, msg > > KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. > > > > ---------------------------------------------------------------------- > > > > Windows errors: > > ====================================================================== > > ERROR: test_sort (test_decomp.TestSchur) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File "C:\Python25\Lib\site-packages\scipy\linalg\tests\test_decomp.py", > > line 1230, in test_sort > > s,u,sdim = schur(a,sort='lhp') > > File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", > > line 118, in schur > > sort_t=sort_t) > > File "C:\Python25\Lib\site-packages\scipy\linalg\decomp_schur.py", > > line 106, in > > sfunction = lambda x: (x.real < 0.0) > > AttributeError: 'float' object has no attribute 'real' > > > > ====================================================================== > > ERROR: Failure: SyntaxError (invalid syntax (test_distributions.py, line > 739)) > > ---------------------------------------------------------------------- > > Traceback (most recent call last): > > File > "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\loader.py", > > line 390, in loadTestsFromName > > addr.filename, addr.module) > > File > "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", > > line 39, in importFromPath > > return self.importFromDir(dir_path, fqname) > > File > "c:\python25\lib\site-packages\nose-1.1.2-py2.5.egg\nose\importer.py", > > line 86, in importFromDir > > mod = load_module(part_fqname, fh, filename, desc) > > File > "C:\Python25\lib\site-packages\scipy\stats\tests\test_distributions.py", > > line 739 > > x = stats.lognorm.rvs(*true, size=100) > > ^ > > SyntaxError: invalid syntax > > This one is my mistake, I only tested with python 2.7, and I get used > to newer syntax. > > No problem, I missed it too. It looked like a trivial patch. Without a buildbot this sort of thing is hard to avoid. Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Sun Nov 6 03:22:01 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Sun, 6 Nov 2011 09:22:01 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey wrote: > On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers > wrote: > > Hi, > > > > There's a problem with schur(.., sort='lhp') under Python 2.5 that seems > to > > be related to the Lapack function gees: > > http://projects.scipy.org/scipy/ticket/1555 > > > > It would be great if someone could have a look at this for the 0.10.0 > > release, but if not I'll mark it as a knownfailure because it's not a > > regression. > > > > Ralf > > > > > > _______________________________________________ > > SciPy-Dev mailing list > > SciPy-Dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/scipy-dev > > > > > I have only tested the RC on my 32-bit Windows install using the > provided binary. > I get the test_decomp.TestSchur and syntax error in test_distributions.py. > > But buried in the test output (when run within command line Python but > not under IDLE) is this: > "capi_return is NULL > Call-back cb_dselect_in_dgees__user__routines failed." > > That's the cause of the TestSchur failure. > This also appears with the current dev version under Linux. > > Bruce > > $ python2.5 test_decomp.py > > ................................................................................................................................................capi_return > is NULL > Call-back cb_dselect_in_dgees__user__routines failed. > > E.....................................................................................................................................E > ====================================================================== > ERROR: test_sort (test_decomp.TestSchur) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", > line 1498, in test_sort > s,u,sdim = schur(a,sort='lhp') > File > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > line 118, in schur > sort_t=sort_t) > File > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > line 106, in > sfunction = lambda x: (x.real < 0.0) > AttributeError: 'float' object has no attribute 'real' > > ====================================================================== > ERROR: test_decomp.test_lapack_misaligned > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.5/site-packages/nose/case.py", line > 186, in runTest > self.test(*self.arg) > File "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", > line 213, in knownfailer > raise KnownFailureTest, msg > KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. > > ---------------------------------------------------------------------- > This one is new. Is this python 2.5 on Linux? Is the error reproduceable? Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsouthey at gmail.com Sun Nov 6 21:47:36 2011 From: bsouthey at gmail.com (Bruce Southey) Date: Sun, 6 Nov 2011 20:47:36 -0600 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Sun, Nov 6, 2011 at 2:22 AM, Ralf Gommers wrote: > > > On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey wrote: >> >> On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers >> wrote: >> > Hi, >> > >> > There's a problem with schur(.., sort='lhp') under Python 2.5 that seems >> > to >> > be related to the Lapack function gees: >> > http://projects.scipy.org/scipy/ticket/1555 >> > >> > It would be great if someone could have a look at this for the 0.10.0 >> > release, but if not I'll mark it as a knownfailure because it's not a >> > regression. >> > >> > Ralf >> > >> > >> > _______________________________________________ >> > SciPy-Dev mailing list >> > SciPy-Dev at scipy.org >> > http://mail.scipy.org/mailman/listinfo/scipy-dev >> > >> > >> I have only tested the RC on my 32-bit Windows install using the >> provided binary. >> I get the test_decomp.TestSchur and syntax error in test_distributions.py. >> >> But buried in the test output (when run within command line Python but >> not under IDLE) is this: >> "capi_return is NULL >> Call-back cb_dselect_in_dgees__user__routines failed." >> > That's the cause of the TestSchur failure. > >> >> This also appears with the current dev version under Linux. >> >> Bruce >> >> $ python2.5 test_decomp.py >> >> ................................................................................................................................................capi_return >> is NULL >> Call-back cb_dselect_in_dgees__user__routines failed. >> >> E.....................................................................................................................................E >> ====================================================================== >> ERROR: test_sort (test_decomp.TestSchur) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> ?File >> "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", >> line 1498, in test_sort >> ? ?s,u,sdim = schur(a,sort='lhp') >> ?File >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", >> line 118, in schur >> ? ?sort_t=sort_t) >> ?File >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", >> line 106, in >> ? ?sfunction = lambda x: (x.real < 0.0) >> AttributeError: 'float' object has no attribute 'real' >> >> ====================================================================== >> ERROR: test_decomp.test_lapack_misaligned >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> ?File "/usr/local/lib/python2.5/site-packages/nose/case.py", line >> 186, in runTest >> ? ?self.test(*self.arg) >> ?File >> "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", >> line 213, in knownfailer >> ? ?raise KnownFailureTest, msg >> KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. >> >> ---------------------------------------------------------------------- > > This one is new. Is this python 2.5 on Linux? Is the error reproduceable? > > Ralf > Sorry as it is a known failure just that running the test file does not pickup the declaration. I am presuming others will test Python2.6, Python2.7 and Python3.1. This Python3.2 error: ===================================================================== ERROR: Failure: AttributeError ('module' object has no attribute 'FileType') ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/failure.py", line 37, in runTest raise self.exc_class(self.exc_val).with_traceback(self.tb) File "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/loader.py", line 390, in loadTestsFromName addr.filename, addr.module) File "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/usr/lib64/python3.2/site-packages/scipy/weave/__init__.py", line 22, in from .blitz_tools import blitz File "/usr/lib64/python3.2/site-packages/scipy/weave/blitz_tools.py", line 6, in from . import converters File "/usr/lib64/python3.2/site-packages/scipy/weave/converters.py", line 19, in c_spec.file_converter(), File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", line 74, in __init__ self.init_info() File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", line 264, in init_info self.matching_types = [types.FileType] AttributeError: 'module' object has no attribute 'FileType' ---------------------------------------------------------------------- Is Python2.4 still being supported as there are 8 errors (see below)? Bruce $ python2.4 -c "import scipy; scipy.test()" Running unit tests for scipy NumPy version 2.0.0.dev-93236a2 NumPy is installed in /usr/local/lib/python2.4/site-packages/numpy SciPy version 0.10.0rc1 SciPy is installed in /usr/local/lib/python2.4/site-packages/scipy Python version 2.4.6 (#1, Sep 13 2010, 15:54:12) [GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] nose version 0.11.2 /usr/local/lib/python2.4/site-packages/scipy/maxentropy/__init__.py:19: DeprecationWarning: The scipy.maxentropy module is deprecated in scipy 0.10, and scheduled to be removed in 0.11. If you are using some of the functionality in this module and are of the opinion that it should be kept or moved somewhere - or you are even interested to maintain/improve this whole module - please ask on the scipy-dev mailing list. The logsumexp function has already been moved to scipy.misc. DeprecationWarning) ............................................................................................................................................................................................................................K............................................................................................................/usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:674: UserWarning: The coefficients of the spline returned have been computed as the minimal norm least-squares solution of a (numerically) rank deficient system (deficiency=7). If deficiency is large, the results may be inaccurate. Deficiency may strongly depend on the value of eps. warnings.warn(message) ....../usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:605: UserWarning: The required storage space exceeds the available storage space: nxest or nyest too small, or s too small. The weighted least-squares spline corresponds to the current set of knots. warnings.warn(message) ........................K..K................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:31: WavFileWarning: Unfamiliar format bytes warnings.warn("Unfamiliar format bytes", WavFileWarning) /usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:121: WavFileWarning: chunk not understood warnings.warn("chunk not understood", WavFileWarning) ...............................................................................................................................................................................................................................SSSSSS......SSSSSS......SSSS......................................................................................................................................................................................................capi_return is NULL Call-back cb_dselect_in_dgees__user__routines failed. E.....................................................................................................................................K......................................................................................................................................................................................................SSSSS............S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E...........................................K...............................................SSSSSSSSSSS.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...............................................................K...........................................................................................E....................E.......E.....E.......E....................KK.............................................................................................................................................................................................................................................................................................................................................................................................................................................K.K.............................................................................................................................................................................................................................................................................................................................................................................................K........K..............SSSSSSS....................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py:1258: DeprecationWarning: putmask has been deprecated. Use copyto with 'where' as the mask instead putmask(output,(1-cond0)*array(cond1,bool),self.badvalue) ....SE..................................................................................................................................................................................................................................................................................................................................................................................................................... ====================================================================== ERROR: test_sort (test_decomp.TestSchur) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py", line 1230, in test_sort s,u,sdim = schur(a,sort='lhp') File "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", line 118, in schur sort_t=sort_t) File "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", line 106, in sfunction = lambda x: (x.real < 0.0) AttributeError: 'float' object has no attribute 'real' ====================================================================== ERROR: test_signaltools.TestHilbert2.test_bad_args ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, in runTest self.test(*self.arg) File "/usr/local/lib/python2.4/site-packages/scipy/signal/tests/test_signaltools.py", line 708, in test_bad_args assert_raises(ValueError, hilbert2, x, N=(2,0)) File "/usr/local/lib/python2.4/site-packages/numpy/testing/utils.py", line 1053, in assert_raises return nose.tools.assert_raises(*args,**kwargs) File "/usr/local/lib/python2.4/unittest.py", line 320, in failUnlessRaises callableObj(*args, **kwargs) File "/usr/local/lib/python2.4/site-packages/scipy/signal/signaltools.py", line 746, in hilbert2 elif len(N) != 2 or any(n <= 0 for n in N): NameError: name 'any' is not defined ====================================================================== ERROR: adding a dense matrix to a sparse matrix ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", line 519, in test_add_dense sum1 = self.dat + self.datsp File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 133, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices ====================================================================== ERROR: test_matmat_sparse (test_base.TestDOK) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", line 417, in test_matmat_sparse assert_array_almost_equal( a2*bsp, a*b) File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 133, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices ====================================================================== ERROR: test_radd (test_base.TestDOK) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", line 279, in test_radd c = a + b File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 133, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices ====================================================================== ERROR: test_rsub (test_base.TestDOK) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", line 290, in test_rsub assert_array_equal((self.dat - self.datsp),[[0,0,0,0],[0,0,0,0],[0,0,0,0]]) File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 133, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices ====================================================================== ERROR: subtracting a dense matrix to/from a sparse matrix ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", line 527, in test_sub_dense sum1 = 3*self.dat - self.datsp File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 133, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices ====================================================================== ERROR: Failure: SyntaxError (invalid syntax (test_distributions.py, line 739)) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/nose/loader.py", line 381, in loadTestsFromName module = self.importer.importFromPath( File "/usr/local/lib/python2.4/site-packages/nose/importer.py", line 39, in importFromPath return self.importFromDir(dir_path, fqname) File "/usr/local/lib/python2.4/site-packages/nose/importer.py", line 86, in importFromDir mod = load_module(part_fqname, fh, filename, desc) File "/usr/local/lib/python2.4/site-packages/scipy/stats/tests/test_distributions.py", line 739 x = stats.lognorm.rvs(*true, size=100) ^ SyntaxError: invalid syntax ---------------------------------------------------------------------- From denis.laxalde at mcgill.ca Mon Nov 7 09:04:18 2011 From: denis.laxalde at mcgill.ca (Denis Laxalde) Date: Mon, 7 Nov 2011 09:04:18 -0500 Subject: [SciPy-Dev] RFC: interface to unconstrained minimization algorithms for multivariate functions Message-ID: <20111107090418.7e1bb621@mcgill.ca> Hi, I've started the implementation of an interface function to unconstrained minimization algorithms. It's in the pull request #94 . There has already been a few iterations with Ralf Gommers but if anybody wants to comment further or suggest something before it gets merged, it's about time! -- Denis Laxalde From ralf.gommers at googlemail.com Mon Nov 7 16:22:29 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Mon, 7 Nov 2011 22:22:29 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Mon, Nov 7, 2011 at 3:47 AM, Bruce Southey wrote: > On Sun, Nov 6, 2011 at 2:22 AM, Ralf Gommers > wrote: > > > > > > On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey > wrote: > >> > >> On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers > >> wrote: > >> > Hi, > >> > > >> > There's a problem with schur(.., sort='lhp') under Python 2.5 that > seems > >> > to > >> > be related to the Lapack function gees: > >> > http://projects.scipy.org/scipy/ticket/1555 > >> > > >> > It would be great if someone could have a look at this for the 0.10.0 > >> > release, but if not I'll mark it as a knownfailure because it's not a > >> > regression. > >> > > >> > Ralf > >> > > >> > > >> > _______________________________________________ > >> > SciPy-Dev mailing list > >> > SciPy-Dev at scipy.org > >> > http://mail.scipy.org/mailman/listinfo/scipy-dev > >> > > >> > > >> I have only tested the RC on my 32-bit Windows install using the > >> provided binary. > >> I get the test_decomp.TestSchur and syntax error in > test_distributions.py. > >> > >> But buried in the test output (when run within command line Python but > >> not under IDLE) is this: > >> "capi_return is NULL > >> Call-back cb_dselect_in_dgees__user__routines failed." > >> > > That's the cause of the TestSchur failure. > > > >> > >> This also appears with the current dev version under Linux. > >> > >> Bruce > >> > >> $ python2.5 test_decomp.py > >> > >> > ................................................................................................................................................capi_return > >> is NULL > >> Call-back cb_dselect_in_dgees__user__routines failed. > >> > >> > E.....................................................................................................................................E > >> ====================================================================== > >> ERROR: test_sort (test_decomp.TestSchur) > >> ---------------------------------------------------------------------- > >> Traceback (most recent call last): > >> File > >> > "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", > >> line 1498, in test_sort > >> s,u,sdim = schur(a,sort='lhp') > >> File > >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > >> line 118, in schur > >> sort_t=sort_t) > >> File > >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > >> line 106, in > >> sfunction = lambda x: (x.real < 0.0) > >> AttributeError: 'float' object has no attribute 'real' > >> > >> ====================================================================== > >> ERROR: test_decomp.test_lapack_misaligned > >> ---------------------------------------------------------------------- > >> Traceback (most recent call last): > >> File "/usr/local/lib/python2.5/site-packages/nose/case.py", line > >> 186, in runTest > >> self.test(*self.arg) > >> File > >> "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", > >> line 213, in knownfailer > >> raise KnownFailureTest, msg > >> KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. > >> > >> ---------------------------------------------------------------------- > > > > This one is new. Is this python 2.5 on Linux? Is the error reproduceable? > > > > Ralf > > > Sorry as it is a known failure just that running the test file does > not pickup the declaration. > Odd. @dec.knownfailureif(True, "...") doesn't work. Code looks fine to me, can't reproduce it. > I am presuming others will test Python2.6, Python2.7 and Python3.1. > > This Python3.2 error: > ===================================================================== > ERROR: Failure: AttributeError ('module' object has no attribute > 'FileType') > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/failure.py", > line 37, in runTest > raise self.exc_class(self.exc_val).with_traceback(self.tb) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/loader.py", > line 390, in loadTestsFromName > addr.filename, addr.module) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", > line 39, in importFromPath > return self.importFromDir(dir_path, fqname) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", > line 86, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File "/usr/lib64/python3.2/site-packages/scipy/weave/__init__.py", > line 22, in > from .blitz_tools import blitz > File "/usr/lib64/python3.2/site-packages/scipy/weave/blitz_tools.py", > line 6, in > from . import converters > File "/usr/lib64/python3.2/site-packages/scipy/weave/converters.py", > line 19, in > c_spec.file_converter(), > File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", > line 74, in __init__ > self.init_info() > File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", > line 264, in init_info > self.matching_types = [types.FileType] > AttributeError: 'module' object has no attribute 'FileType' > > ---------------------------------------------------------------------- > > Due to weave not being py3k compatible. Perhaps we should raise a clearer error here. > > Is Python2.4 still being supported as there are 8 errors (see below)? > > It is. Just kind of hard to support it in practice with no one using it and no buildbot. Thanks for finding these errors. > > Bruce > > $ python2.4 -c "import scipy; scipy.test()" > Running unit tests for scipy > NumPy version 2.0.0.dev-93236a2 > NumPy is installed in /usr/local/lib/python2.4/site-packages/numpy > SciPy version 0.10.0rc1 > SciPy is installed in /usr/local/lib/python2.4/site-packages/scipy > Python version 2.4.6 (#1, Sep 13 2010, 15:54:12) [GCC 4.4.4 20100630 > (Red Hat 4.4.4-10)] > nose version 0.11.2 > /usr/local/lib/python2.4/site-packages/scipy/maxentropy/__init__.py:19: > DeprecationWarning: > The scipy.maxentropy module is deprecated in scipy 0.10, and scheduled to > be > removed in 0.11. > > If you are using some of the functionality in this module and are of the > opinion that it should be kept or moved somewhere - or you are even > interested > to maintain/improve this whole module - please ask on the scipy-dev mailing > list. > > The logsumexp function has already been moved to scipy.misc. > DeprecationWarning) > > ............................................................................................................................................................................................................................K............................................................................................................/usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:674: > UserWarning: > The coefficients of the spline returned have been computed as the > minimal norm least-squares solution of a (numerically) rank deficient > system (deficiency=7). If deficiency is large, the results may be > inaccurate. Deficiency may strongly depend on the value of eps. > warnings.warn(message) > > ....../usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:605: > UserWarning: > The required storage space exceeds the available storage space: nxest > or nyest too small, or s too small. > The weighted least-squares spline corresponds to the current set of > knots. > warnings.warn(message) > > ........................K..K................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:31: > WavFileWarning: Unfamiliar format bytes > warnings.warn("Unfamiliar format bytes", WavFileWarning) > /usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:121: > WavFileWarning: chunk not understood > warnings.warn("chunk not understood", WavFileWarning) > > ...............................................................................................................................................................................................................................SSSSSS......SSSSSS......SSSS......................................................................................................................................................................................................capi_return > is NULL > Call-back cb_dselect_in_dgees__user__routines failed. > > E.....................................................................................................................................K......................................................................................................................................................................................................SSSSS............S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E...........................................K...............................................SSSSSSSSSSS.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...............................................................K...........................................................................................E....................E.......E.....E.......E....................KK.............................................................................................................................................................................................................................................................................................................................................................................................................................................K.K.............................................................................................................................................................................................................................................................................................................................................................................................K........K..............SSSSSSS....................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py:1258: > DeprecationWarning: putmask has been deprecated. Use copyto with > 'where' as the mask instead > putmask(output,(1-cond0)*array(cond1,bool),self.badvalue) > > ....SE..................................................................................................................................................................................................................................................................................................................................................................................................................... > ====================================================================== > ERROR: test_sort (test_decomp.TestSchur) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py", > line 1230, in test_sort > s,u,sdim = schur(a,sort='lhp') > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", > line 118, in schur > sort_t=sort_t) > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", > line 106, in > sfunction = lambda x: (x.real < 0.0) > AttributeError: 'float' object has no attribute 'real' > http://projects.scipy.org/scipy/ticket/1555 > > ====================================================================== > ERROR: test_signaltools.TestHilbert2.test_bad_args > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.4/site-packages/nose/case.py", line > 186, in runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.4/site-packages/scipy/signal/tests/test_signaltools.py", > line 708, in test_bad_args > assert_raises(ValueError, hilbert2, x, N=(2,0)) > File "/usr/local/lib/python2.4/site-packages/numpy/testing/utils.py", > line 1053, in assert_raises > return nose.tools.assert_raises(*args,**kwargs) > File "/usr/local/lib/python2.4/unittest.py", line 320, in failUnlessRaises > callableObj(*args, **kwargs) > File "/usr/local/lib/python2.4/site-packages/scipy/signal/signaltools.py", > line 746, in hilbert2 > elif len(N) != 2 or any(n <= 0 for n in N): > NameError: name 'any' is not defined > Will push a fix for that in a minute. > > ====================================================================== > ERROR: adding a dense matrix to a sparse matrix > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 519, in test_add_dense > sum1 = self.dat + self.datsp > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_matmat_sparse (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 417, in test_matmat_sparse > assert_array_almost_equal( a2*bsp, a*b) > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_radd (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 279, in test_radd > c = a + b > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_rsub (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 290, in test_rsub > assert_array_equal((self.dat - > self.datsp),[[0,0,0,0],[0,0,0,0],[0,0,0,0]]) > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: subtracting a dense matrix to/from a sparse matrix > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 527, in test_sub_dense > sum1 = 3*self.dat - self.datsp > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > These are odd. A dok_matrix can't be indexed with a single integer, which causes errors when we do ``obj + dokmatrix`` when obj is an ndarray or matrix. It looks to me like indexing with single integers should trigger a conversion to a dense array or something like that. Also I don't understand why it doesn't fail for other Python versions. Are numpy arrays somehow aware of sparse matrix details? If anyone with more knowledge of how this sparse matrix arithmetic is supposed to work can explain or have a look, that would be great. Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Mon Nov 7 16:55:25 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Mon, 7 Nov 2011 22:55:25 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: <871utpl79q.fsf@gmail.com> References: <87ipn1le5f.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no> <871utpl79q.fsf@gmail.com> Message-ID: On Thu, Nov 3, 2011 at 1:28 PM, Antoine Levitt wrote: > The version in scitools looks consistent with numpy, compatible with the > current API, and useful (in the common use case of a 3D grid, or a > rectangular grid with irregular spacing, mgrid and ogrid are not enough) > > Could someone take a look at it? > Looks like a useful improvement in functionality for little added complexity in the interface. So in principle I'm +1. The patch does need tests though, and it would be good if someone could check that the 2-D case doesn't get much slower. Ralf > 03/11/11 12:57, Per.Brodtkorb at ffi.no > > There is a ticket for this in numpy: > > > > http://projects.scipy.org/numpy/ticket/966 > > > > that needs a decision. > > > > Per A. Brodtkorb > > > > -----Opprinnelig melding----- > > Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] > P? vegne av Antoine Levitt > > Sendt: 3. november 2011 11:00 > > Til: scipy-dev at scipy.org > > Emne: [SciPy-Dev] 3D Meshgrid > > > > Hi, > > > > Could meshgrid be extended to support 3D grids? It's a pretty natural > > use case, and would bring it closer to matlab. > > > > There's some discussion at > > http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d > > > > Antoine > > > > _______________________________________________ > > SciPy-Dev mailing list > > SciPy-Dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/scipy-dev > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Mon Nov 7 17:52:30 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Mon, 7 Nov 2011 23:52:30 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: On Mon, Nov 7, 2011 at 10:22 PM, Ralf Gommers wrote: > > > On Mon, Nov 7, 2011 at 3:47 AM, Bruce Southey wrote: > >> On Sun, Nov 6, 2011 at 2:22 AM, Ralf Gommers >> wrote: >> > >> > >> > On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey >> wrote: >> >> >> >> On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers >> >> wrote: >> >> > Hi, >> >> > >> >> > There's a problem with schur(.., sort='lhp') under Python 2.5 that >> seems >> >> > to >> >> > be related to the Lapack function gees: >> >> > http://projects.scipy.org/scipy/ticket/1555 >> >> > >> >> > It would be great if someone could have a look at this for the 0.10.0 >> >> > release, but if not I'll mark it as a knownfailure because it's not a >> >> > regression. >> >> > >> >> > Ralf >> >> > >> >> > >> >> > _______________________________________________ >> >> > SciPy-Dev mailing list >> >> > SciPy-Dev at scipy.org >> >> > http://mail.scipy.org/mailman/listinfo/scipy-dev >> >> > >> >> > >> >> I have only tested the RC on my 32-bit Windows install using the >> >> provided binary. >> >> I get the test_decomp.TestSchur and syntax error in >> test_distributions.py. >> >> >> >> But buried in the test output (when run within command line Python but >> >> not under IDLE) is this: >> >> "capi_return is NULL >> >> Call-back cb_dselect_in_dgees__user__routines failed." >> >> >> > That's the cause of the TestSchur failure. >> > >> >> >> >> This also appears with the current dev version under Linux. >> >> >> >> Bruce >> >> >> >> $ python2.5 test_decomp.py >> >> >> >> >> ................................................................................................................................................capi_return >> >> is NULL >> >> Call-back cb_dselect_in_dgees__user__routines failed. >> >> >> >> >> E.....................................................................................................................................E >> >> ====================================================================== >> >> ERROR: test_sort (test_decomp.TestSchur) >> >> ---------------------------------------------------------------------- >> >> Traceback (most recent call last): >> >> File >> >> >> "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", >> >> line 1498, in test_sort >> >> s,u,sdim = schur(a,sort='lhp') >> >> File >> >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", >> >> line 118, in schur >> >> sort_t=sort_t) >> >> File >> >> "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", >> >> line 106, in >> >> sfunction = lambda x: (x.real < 0.0) >> >> AttributeError: 'float' object has no attribute 'real' >> >> >> >> ====================================================================== >> >> ERROR: test_decomp.test_lapack_misaligned >> >> ---------------------------------------------------------------------- >> >> Traceback (most recent call last): >> >> File "/usr/local/lib/python2.5/site-packages/nose/case.py", line >> >> 186, in runTest >> >> self.test(*self.arg) >> >> File >> >> "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", >> >> line 213, in knownfailer >> >> raise KnownFailureTest, msg >> >> KnownFailureTest: Ticket #1152, triggers a segfault in rare cases. >> >> >> >> ---------------------------------------------------------------------- >> > >> > This one is new. Is this python 2.5 on Linux? Is the error >> reproduceable? >> > >> > Ralf >> > >> Sorry as it is a known failure just that running the test file does >> not pickup the declaration. >> > > Odd. @dec.knownfailureif(True, "...") doesn't work. Code looks fine to me, > can't reproduce it. > > >> I am presuming others will test Python2.6, Python2.7 and Python3.1. >> >> This Python3.2 error: >> ===================================================================== >> ERROR: Failure: AttributeError ('module' object has no attribute >> 'FileType') >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/failure.py", >> line 37, in runTest >> raise self.exc_class(self.exc_val).with_traceback(self.tb) >> File >> "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/loader.py", >> line 390, in loadTestsFromName >> addr.filename, addr.module) >> File >> "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", >> line 39, in importFromPath >> return self.importFromDir(dir_path, fqname) >> File >> "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", >> line 86, in importFromDir >> mod = load_module(part_fqname, fh, filename, desc) >> File "/usr/lib64/python3.2/site-packages/scipy/weave/__init__.py", >> line 22, in >> from .blitz_tools import blitz >> File "/usr/lib64/python3.2/site-packages/scipy/weave/blitz_tools.py", >> line 6, in >> from . import converters >> File "/usr/lib64/python3.2/site-packages/scipy/weave/converters.py", >> line 19, in >> c_spec.file_converter(), >> File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", >> line 74, in __init__ >> self.init_info() >> File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", >> line 264, in init_info >> self.matching_types = [types.FileType] >> AttributeError: 'module' object has no attribute 'FileType' >> >> ---------------------------------------------------------------------- >> >> Due to weave not being py3k compatible. Perhaps we should raise a clearer > error here. > > >> >> Is Python2.4 still being supported as there are 8 errors (see below)? >> >> It is. Just kind of hard to support it in practice with no one using it > and no buildbot. Thanks for finding these errors. > >> >> Bruce >> >> $ python2.4 -c "import scipy; scipy.test()" >> Running unit tests for scipy >> NumPy version 2.0.0.dev-93236a2 >> NumPy is installed in /usr/local/lib/python2.4/site-packages/numpy >> SciPy version 0.10.0rc1 >> SciPy is installed in /usr/local/lib/python2.4/site-packages/scipy >> Python version 2.4.6 (#1, Sep 13 2010, 15:54:12) [GCC 4.4.4 20100630 >> (Red Hat 4.4.4-10)] >> nose version 0.11.2 >> /usr/local/lib/python2.4/site-packages/scipy/maxentropy/__init__.py:19: >> DeprecationWarning: >> The scipy.maxentropy module is deprecated in scipy 0.10, and scheduled to >> be >> removed in 0.11. >> >> If you are using some of the functionality in this module and are of the >> opinion that it should be kept or moved somewhere - or you are even >> interested >> to maintain/improve this whole module - please ask on the scipy-dev >> mailing >> list. >> >> The logsumexp function has already been moved to scipy.misc. >> DeprecationWarning) >> >> ............................................................................................................................................................................................................................K............................................................................................................/usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:674: >> UserWarning: >> The coefficients of the spline returned have been computed as the >> minimal norm least-squares solution of a (numerically) rank deficient >> system (deficiency=7). If deficiency is large, the results may be >> inaccurate. Deficiency may strongly depend on the value of eps. >> warnings.warn(message) >> >> ....../usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:605: >> UserWarning: >> The required storage space exceeds the available storage space: nxest >> or nyest too small, or s too small. >> The weighted least-squares spline corresponds to the current set of >> knots. >> warnings.warn(message) >> >> ........................K..K................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:31: >> WavFileWarning: Unfamiliar format bytes >> warnings.warn("Unfamiliar format bytes", WavFileWarning) >> /usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:121: >> WavFileWarning: chunk not understood >> warnings.warn("chunk not understood", WavFileWarning) >> >> ...............................................................................................................................................................................................................................SSSSSS......SSSSSS......SSSS......................................................................................................................................................................................................capi_return >> is NULL >> Call-back cb_dselect_in_dgees__user__routines failed. >> >> E.....................................................................................................................................K......................................................................................................................................................................................................SSSSS............S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E...........................................K...............................................SSSSSSSSSSS.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...............................................................K...........................................................................................E....................E.......E.....E.......E....................KK.............................................................................................................................................................................................................................................................................................................................................................................................................................................K.K.............................................................................................................................................................................................................................................................................................................................................................................................K........K..............SSSSSSS....................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py:1258: >> DeprecationWarning: putmask has been deprecated. Use copyto with >> 'where' as the mask instead >> putmask(output,(1-cond0)*array(cond1,bool),self.badvalue) >> >> ....SE..................................................................................................................................................................................................................................................................................................................................................................................................................... >> ====================================================================== >> ERROR: test_sort (test_decomp.TestSchur) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py", >> line 1230, in test_sort >> s,u,sdim = schur(a,sort='lhp') >> File >> "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", >> line 118, in schur >> sort_t=sort_t) >> File >> "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", >> line 106, in >> sfunction = lambda x: (x.real < 0.0) >> AttributeError: 'float' object has no attribute 'real' >> > > http://projects.scipy.org/scipy/ticket/1555 > >> >> ====================================================================== >> ERROR: test_signaltools.TestHilbert2.test_bad_args >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File "/usr/local/lib/python2.4/site-packages/nose/case.py", line >> 186, in runTest >> self.test(*self.arg) >> File >> "/usr/local/lib/python2.4/site-packages/scipy/signal/tests/test_signaltools.py", >> line 708, in test_bad_args >> assert_raises(ValueError, hilbert2, x, N=(2,0)) >> File "/usr/local/lib/python2.4/site-packages/numpy/testing/utils.py", >> line 1053, in assert_raises >> return nose.tools.assert_raises(*args,**kwargs) >> File "/usr/local/lib/python2.4/unittest.py", line 320, in >> failUnlessRaises >> callableObj(*args, **kwargs) >> File >> "/usr/local/lib/python2.4/site-packages/scipy/signal/signaltools.py", >> line 746, in hilbert2 >> elif len(N) != 2 or any(n <= 0 for n in N): >> NameError: name 'any' is not defined >> > > Will push a fix for that in a minute. > >> >> ====================================================================== >> ERROR: adding a dense matrix to a sparse matrix >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >> line 519, in test_add_dense >> sum1 = self.dat + self.datsp >> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >> line 133, in __getitem__ >> raise TypeError('index must be a pair of integers or slices') >> TypeError: index must be a pair of integers or slices >> >> ====================================================================== >> ERROR: test_matmat_sparse (test_base.TestDOK) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >> line 417, in test_matmat_sparse >> assert_array_almost_equal( a2*bsp, a*b) >> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >> line 133, in __getitem__ >> raise TypeError('index must be a pair of integers or slices') >> TypeError: index must be a pair of integers or slices >> >> ====================================================================== >> ERROR: test_radd (test_base.TestDOK) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >> line 279, in test_radd >> c = a + b >> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >> line 133, in __getitem__ >> raise TypeError('index must be a pair of integers or slices') >> TypeError: index must be a pair of integers or slices >> >> ====================================================================== >> ERROR: test_rsub (test_base.TestDOK) >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >> line 290, in test_rsub >> assert_array_equal((self.dat - >> self.datsp),[[0,0,0,0],[0,0,0,0],[0,0,0,0]]) >> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >> line 133, in __getitem__ >> raise TypeError('index must be a pair of integers or slices') >> TypeError: index must be a pair of integers or slices >> >> ====================================================================== >> ERROR: subtracting a dense matrix to/from a sparse matrix >> ---------------------------------------------------------------------- >> Traceback (most recent call last): >> File >> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >> line 527, in test_sub_dense >> sum1 = 3*self.dat - self.datsp >> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >> line 133, in __getitem__ >> raise TypeError('index must be a pair of integers or slices') >> TypeError: index must be a pair of integers or slices >> >> These are odd. A dok_matrix can't be indexed with a single integer, which > causes errors when we do ``obj + dokmatrix`` when obj is an ndarray or > matrix. It looks to me like indexing with single integers should trigger a > conversion to a dense array or something like that. > dok_matrix.__radd__ (which has the todense() call) is called for Python >= 2.5, but not for 2.4. I can't find anything related to this in the "what's new in python 2.5" doc. Ralf Also I don't understand why it doesn't fail for other Python versions. Are > numpy arrays somehow aware of sparse matrix details? > > If anyone with more knowledge of how this sparse matrix arithmetic is > supposed to work can explain or have a look, that would be great. > > Ralf > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsouthey at gmail.com Tue Nov 8 10:55:36 2011 From: bsouthey at gmail.com (Bruce Southey) Date: Tue, 08 Nov 2011 09:55:36 -0600 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: References: Message-ID: <4EB950F8.1060503@gmail.com> On 11/07/2011 04:52 PM, Ralf Gommers wrote: > > > On Mon, Nov 7, 2011 at 10:22 PM, Ralf Gommers > > wrote: > > > > On Mon, Nov 7, 2011 at 3:47 AM, Bruce Southey > wrote: > > On Sun, Nov 6, 2011 at 2:22 AM, Ralf Gommers > > wrote: > > > > > > On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey > > wrote: > >> > >> On Sat, Nov 5, 2011 at 1:40 PM, Ralf Gommers > >> > wrote: > >> > Hi, > >> > > >> > There's a problem with schur(.., sort='lhp') under Python > 2.5 that seems > >> > to > >> > be related to the Lapack function gees: > >> > http://projects.scipy.org/scipy/ticket/1555 > >> > > >> > It would be great if someone could have a look at this > for the 0.10.0 > >> > release, but if not I'll mark it as a knownfailure > because it's not a > >> > regression. > >> > > >> > Ralf > >> > > >> > > >> > _______________________________________________ > >> > SciPy-Dev mailing list > >> > SciPy-Dev at scipy.org > >> > http://mail.scipy.org/mailman/listinfo/scipy-dev > >> > > >> > > >> I have only tested the RC on my 32-bit Windows install > using the > >> provided binary. > >> I get the test_decomp.TestSchur and syntax error in > test_distributions.py. > >> > >> But buried in the test output (when run within command line > Python but > >> not under IDLE) is this: > >> "capi_return is NULL > >> Call-back cb_dselect_in_dgees__user__routines failed." > >> > > That's the cause of the TestSchur failure. > > > >> > >> This also appears with the current dev version under Linux. > >> > >> Bruce > >> > >> $ python2.5 test_decomp.py > >> > >> > ................................................................................................................................................capi_return > >> is NULL > >> Call-back cb_dselect_in_dgees__user__routines failed. > >> > >> > E.....................................................................................................................................E > >> > ====================================================================== > >> ERROR: test_sort (test_decomp.TestSchur) > >> > ---------------------------------------------------------------------- > >> Traceback (most recent call last): > >> File > >> > "/home/bsouthey/python/scipystuff/git/scipy/scipy/linalg/tests/test_decomp.py", > >> line 1498, in test_sort > >> s,u,sdim = schur(a,sort='lhp') > >> File > >> > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > >> line 118, in schur > >> sort_t=sort_t) > >> File > >> > "/usr/local/lib/python2.5/site-packages/scipy/linalg/decomp_schur.py", > >> line 106, in > >> sfunction = lambda x: (x.real < 0.0) > >> AttributeError: 'float' object has no attribute 'real' > >> > >> > ====================================================================== > >> ERROR: test_decomp.test_lapack_misaligned > >> > ---------------------------------------------------------------------- > >> Traceback (most recent call last): > >> File > "/usr/local/lib/python2.5/site-packages/nose/case.py", line > >> 186, in runTest > >> self.test(*self.arg) > >> File > >> > "/usr/local/lib/python2.5/site-packages/numpy/testing/decorators.py", > >> line 213, in knownfailer > >> raise KnownFailureTest, msg > >> KnownFailureTest: Ticket #1152, triggers a segfault in rare > cases. > >> > >> > ---------------------------------------------------------------------- > > > > This one is new. Is this python 2.5 on Linux? Is the error > reproduceable? > > > > Ralf > > > Sorry as it is a known failure just that running the test file > does > not pickup the declaration. > > > Odd. @dec.knownfailureif(True, "...") doesn't work. Code looks > fine to me, can't reproduce it. > > I am presuming others will test Python2.6, Python2.7 and > Python3.1. > > This Python3.2 error: > ===================================================================== > ERROR: Failure: AttributeError ('module' object has no > attribute 'FileType') > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/failure.py", > line 37, in runTest > raise self.exc_class(self.exc_val).with_traceback(self.tb) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/loader.py", > line 390, in loadTestsFromName > addr.filename, addr.module) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", > line 39, in importFromPath > return self.importFromDir(dir_path, fqname) > File > "/usr/lib/python3.2/site-packages/nose-1.0.0-py3.2.egg/nose/importer.py", > line 86, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File > "/usr/lib64/python3.2/site-packages/scipy/weave/__init__.py", > line 22, in > from .blitz_tools import blitz > File > "/usr/lib64/python3.2/site-packages/scipy/weave/blitz_tools.py", > line 6, in > from . import converters > File > "/usr/lib64/python3.2/site-packages/scipy/weave/converters.py", > line 19, in > c_spec.file_converter(), > File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", > line 74, in __init__ > self.init_info() > File "/usr/lib64/python3.2/site-packages/scipy/weave/c_spec.py", > line 264, in init_info > self.matching_types = [types.FileType] > AttributeError: 'module' object has no attribute 'FileType' > > ---------------------------------------------------------------------- > > Due to weave not being py3k compatible. Perhaps we should raise a > clearer error here. > > > Is Python2.4 still being supported as there are 8 errors (see > below)? > > It is. Just kind of hard to support it in practice with no one > using it and no buildbot. Thanks for finding these errors. > > > Bruce > > $ python2.4 -c "import scipy; scipy.test()" > Running unit tests for scipy > NumPy version 2.0.0.dev-93236a2 > NumPy is installed in /usr/local/lib/python2.4/site-packages/numpy > SciPy version 0.10.0rc1 > SciPy is installed in /usr/local/lib/python2.4/site-packages/scipy > Python version 2.4.6 (#1, Sep 13 2010, 15:54:12) [GCC 4.4.4 > 20100630 > (Red Hat 4.4.4-10)] > nose version 0.11.2 > /usr/local/lib/python2.4/site-packages/scipy/maxentropy/__init__.py:19: > DeprecationWarning: > The scipy.maxentropy module is deprecated in scipy 0.10, and > scheduled to be > removed in 0.11. > > If you are using some of the functionality in this module and > are of the > opinion that it should be kept or moved somewhere - or you are > even interested > to maintain/improve this whole module - please ask on the > scipy-dev mailing > list. > > The logsumexp function has already been moved to scipy.misc. > DeprecationWarning) > ............................................................................................................................................................................................................................K............................................................................................................/usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:674: > UserWarning: > The coefficients of the spline returned have been computed as the > minimal norm least-squares solution of a (numerically) rank > deficient > system (deficiency=7). If deficiency is large, the results may be > inaccurate. Deficiency may strongly depend on the value of eps. > warnings.warn(message) > ....../usr/local/lib/python2.4/site-packages/scipy/interpolate/fitpack2.py:605: > UserWarning: > The required storage space exceeds the available storage > space: nxest > or nyest too small, or s too small. > The weighted least-squares spline corresponds to the current > set of > knots. > warnings.warn(message) > ........................K..K................................................................................................................................................................................................................................................................................................................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:31: > WavFileWarning: Unfamiliar format bytes > warnings.warn("Unfamiliar format bytes", WavFileWarning) > /usr/local/lib/python2.4/site-packages/scipy/io/wavfile.py:121: > WavFileWarning: chunk not understood > warnings.warn("chunk not understood", WavFileWarning) > ...............................................................................................................................................................................................................................SSSSSS......SSSSSS......SSSS......................................................................................................................................................................................................capi_return > is NULL > Call-back cb_dselect_in_dgees__user__routines failed. > E.....................................................................................................................................K......................................................................................................................................................................................................SSSSS............S............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................E...........................................K...............................................SSSSSSSSSSS.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................K...............................................................K...........................................................................................E....................E.......E.....E.......E....................KK.............................................................................................................................................................................................................................................................................................................................................................................................................................................K.K.............................................................................................................................................................................................................................................................................................................................................................................................K........K..............SSSSSSS....................................................................................................................................................../usr/local/lib/python2.4/site-packages/scipy/stats/distributions.py:1258: > DeprecationWarning: putmask has been deprecated. Use copyto with > 'where' as the mask instead > putmask(output,(1-cond0)*array(cond1,bool),self.badvalue) > ....SE..................................................................................................................................................................................................................................................................................................................................................................................................................... > ====================================================================== > ERROR: test_sort (test_decomp.TestSchur) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/tests/test_decomp.py", > line 1230, in test_sort > s,u,sdim = schur(a,sort='lhp') > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", > line 118, in schur > sort_t=sort_t) > File > "/usr/local/lib/python2.4/site-packages/scipy/linalg/decomp_schur.py", > line 106, in > sfunction = lambda x: (x.real < 0.0) > AttributeError: 'float' object has no attribute 'real' > > > http://projects.scipy.org/scipy/ticket/1555 > > > ====================================================================== > ERROR: test_signaltools.TestHilbert2.test_bad_args > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/usr/local/lib/python2.4/site-packages/nose/case.py", line > 186, in runTest > self.test(*self.arg) > File > "/usr/local/lib/python2.4/site-packages/scipy/signal/tests/test_signaltools.py", > line 708, in test_bad_args > assert_raises(ValueError, hilbert2, x, N=(2,0)) > File > "/usr/local/lib/python2.4/site-packages/numpy/testing/utils.py", > line 1053, in assert_raises > return nose.tools.assert_raises(*args,**kwargs) > File "/usr/local/lib/python2.4/unittest.py", line 320, in > failUnlessRaises > callableObj(*args, **kwargs) > File > "/usr/local/lib/python2.4/site-packages/scipy/signal/signaltools.py", > line 746, in hilbert2 > elif len(N) != 2 or any(n <= 0 for n in N): > NameError: name 'any' is not defined > > > Will push a fix for that in a minute. > > > ====================================================================== > ERROR: adding a dense matrix to a sparse matrix > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 519, in test_add_dense > sum1 = self.dat + self.datsp > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_matmat_sparse (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 417, in test_matmat_sparse > assert_array_almost_equal( a2*bsp, a*b) > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_radd (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 279, in test_radd > c = a + b > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: test_rsub (test_base.TestDOK) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 290, in test_rsub > assert_array_equal((self.dat - > self.datsp),[[0,0,0,0],[0,0,0,0],[0,0,0,0]]) > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > ====================================================================== > ERROR: subtracting a dense matrix to/from a sparse matrix > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", > line 527, in test_sub_dense > sum1 = 3*self.dat - self.datsp > File > "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", > line 133, in __getitem__ > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > These are odd. A dok_matrix can't be indexed with a single > integer, which causes errors when we do ``obj + dokmatrix`` when > obj is an ndarray or matrix. It looks to me like indexing with > single integers should trigger a conversion to a dense array or > something like that. > > > dok_matrix.__radd__ (which has the todense() call) is called for > Python >= 2.5, but not for 2.4. I can't find anything related to this > in the "what's new in python 2.5" doc. > > Ralf > > > Also I don't understand why it doesn't fail for other Python > versions. Are numpy arrays somehow aware of sparse matrix details? > > If anyone with more knowledge of how this sparse matrix arithmetic > is supposed to work can explain or have a look, that would be great. > > Ralf > > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev Actually this Python 2.4 error has been here since 0.7.0 when the dok format was introduced. But means there are no or very few Python2.4 scipy users or they have some way around this (calling todense() ) and other issues. I am totally ignorant here and probably why I gave up assuming I looked at this before (as I usually try to find the cause of the failure). Python 2.4 appears to call __getitem__ and but not __radd__ whereas Python2.5 does not call __getitem__ but calls __radd__. So all I can understand is that I can reproduce the error under 0.7.0 as follows. Perhaps a bug should be filed and perhaps set to won't fix if Python2.4 support will be dropped 'soon' because this apparently has not been previously been reported. Bruce $ python2.4 Python 2.4.6 (#1, Sep 13 2010, 15:54:12) [GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy as np >>> import scipy as sp >>> import scipy.sparse as sparse >>> print 'Numpy version=',np.__version__ Numpy version= 2.0.0.dev-93236a2 >>> print 'Scipy version=',sp.__version__ Scipy version= 0.7.0 >>> dmat= np.matrix([[1,0,0,2],[3,0,1,0],[0,2,0,0]],'d') >>> print 'dense matrix\n', dmat dense matrix [[ 1. 0. 0. 2.] [ 3. 0. 1. 0.] [ 0. 2. 0. 0.]] >>> smat=sparse.dok_matrix(dmat) >>> print 'Sparse dok matrix\n', smat Sparse dok matrix (1, 2) 1.0 (0, 3) 2.0 (0, 0) 1.0 (1, 0) 3.0 (2, 1) 2.0 >>> sumd=dmat+smat.todense() # work around >>> print 'use todense\n', sumd use todense [[ 2. 0. 0. 4.] [ 6. 0. 2. 0.] [ 0. 4. 0. 0.]] >>> sum1=dmat+smat Traceback (most recent call last): File "", line 1, in ? File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line 119, in __getitem__ raise TypeError('index must be a pair of integers or slices') TypeError: index must be a pair of integers or slices -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Tue Nov 8 16:04:13 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Tue, 8 Nov 2011 22:04:13 +0100 Subject: [SciPy-Dev] Schur decomposition test failure under Python 2.5 In-Reply-To: <4EB950F8.1060503@gmail.com> References: <4EB950F8.1060503@gmail.com> Message-ID: On Tue, Nov 8, 2011 at 4:55 PM, Bruce Southey wrote: > ** > On 11/07/2011 04:52 PM, Ralf Gommers wrote: > > > > On Mon, Nov 7, 2011 at 10:22 PM, Ralf Gommers > wrote: > >> >> >> On Mon, Nov 7, 2011 at 3:47 AM, Bruce Southey wrote: >> >>> On Sun, Nov 6, 2011 at 2:22 AM, Ralf Gommers >>> wrote: >>> > >>> > >>> > On Sun, Nov 6, 2011 at 3:26 AM, Bruce Southey >>> wrote: >>> >>>> >>>> ====================================================================== >>>> ERROR: adding a dense matrix to a sparse matrix >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >>>> line 519, in test_add_dense >>>> sum1 = self.dat + self.datsp >>>> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >>>> line 133, in __getitem__ >>>> raise TypeError('index must be a pair of integers or slices') >>>> TypeError: index must be a pair of integers or slices >>>> >>>> ====================================================================== >>>> ERROR: test_matmat_sparse (test_base.TestDOK) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >>>> line 417, in test_matmat_sparse >>>> assert_array_almost_equal( a2*bsp, a*b) >>>> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >>>> line 133, in __getitem__ >>>> raise TypeError('index must be a pair of integers or slices') >>>> TypeError: index must be a pair of integers or slices >>>> >>>> ====================================================================== >>>> ERROR: test_radd (test_base.TestDOK) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >>>> line 279, in test_radd >>>> c = a + b >>>> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >>>> line 133, in __getitem__ >>>> raise TypeError('index must be a pair of integers or slices') >>>> TypeError: index must be a pair of integers or slices >>>> >>>> ====================================================================== >>>> ERROR: test_rsub (test_base.TestDOK) >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >>>> line 290, in test_rsub >>>> assert_array_equal((self.dat - >>>> self.datsp),[[0,0,0,0],[0,0,0,0],[0,0,0,0]]) >>>> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >>>> line 133, in __getitem__ >>>> raise TypeError('index must be a pair of integers or slices') >>>> TypeError: index must be a pair of integers or slices >>>> >>>> ====================================================================== >>>> ERROR: subtracting a dense matrix to/from a sparse matrix >>>> ---------------------------------------------------------------------- >>>> Traceback (most recent call last): >>>> File >>>> "/usr/local/lib/python2.4/site-packages/scipy/sparse/tests/test_base.py", >>>> line 527, in test_sub_dense >>>> sum1 = 3*self.dat - self.datsp >>>> File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", >>>> line 133, in __getitem__ >>>> raise TypeError('index must be a pair of integers or slices') >>>> TypeError: index must be a pair of integers or slices >>>> >>>> These are odd. A dok_matrix can't be indexed with a single integer, >>> which causes errors when we do ``obj + dokmatrix`` when obj is an ndarray >>> or matrix. It looks to me like indexing with single integers should trigger >>> a conversion to a dense array or something like that. >>> >> > dok_matrix.__radd__ (which has the todense() call) is called for Python >= > 2.5, but not for 2.4. I can't find anything related to this in the "what's > new in python 2.5" doc. > > Ralf > > > Also I don't understand why it doesn't fail for other Python versions. >> Are numpy arrays somehow aware of sparse matrix details? >> >> If anyone with more knowledge of how this sparse matrix arithmetic is >> supposed to work can explain or have a look, that would be great. >> >> Ralf >> >> > > _______________________________________________ > SciPy-Dev mailing listSciPy-Dev at scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-dev > > Actually this Python 2.4 error has been here since 0.7.0 when the dok > format was introduced. But means there are no or very few Python2.4 scipy > users or they have some way around this (calling todense() ) and other > issues. > > I am totally ignorant here and probably why I gave up assuming I looked at > this before (as I usually try to find the cause of the failure). Python 2.4 > appears to call __getitem__ and but not __radd__ whereas Python2.5 does not > call __getitem__ but calls __radd__. So all I can understand is that I can > reproduce the error under 0.7.0 as follows. > > Perhaps a bug should be filed and perhaps set to won't fix if Python2.4 > support will be dropped 'soon' because this apparently has not been > previously been reported. > Since the problem can be worked around and has been present for a long time, I'm okay with marking it knownfail for 2.4. Not sure about "soon" though, every time it comes up someone claims to need support for several more years. Ralf > Bruce > > > $ python2.4 > Python 2.4.6 (#1, Sep 13 2010, 15:54:12) > [GCC 4.4.4 20100630 (Red Hat 4.4.4-10)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import numpy as np > >>> import scipy as sp > >>> import scipy.sparse as sparse > >>> print 'Numpy version=',np.__version__ > Numpy version= 2.0.0.dev-93236a2 > >>> print 'Scipy version=',sp.__version__ > Scipy version= 0.7.0 > >>> dmat= np.matrix([[1,0,0,2],[3,0,1,0],[0,2,0,0]],'d') > >>> print 'dense matrix\n', dmat > dense matrix > [[ 1. 0. 0. 2.] > [ 3. 0. 1. 0.] > [ 0. 2. 0. 0.]] > >>> smat=sparse.dok_matrix(dmat) > >>> print 'Sparse dok matrix\n', smat > Sparse dok matrix > (1, 2) 1.0 > (0, 3) 2.0 > (0, 0) 1.0 > (1, 0) 3.0 > (2, 1) 2.0 > >>> sumd=dmat+smat.todense() # work around > >>> print 'use todense\n', sumd > use todense > [[ 2. 0. 0. 4.] > [ 6. 0. 2. 0.] > [ 0. 4. 0. 0.]] > >>> sum1=dmat+smat > > Traceback (most recent call last): > File "", line 1, in ? > File "/usr/local/lib/python2.4/site-packages/scipy/sparse/dok.py", line > 119, in __getitem__ > > raise TypeError('index must be a pair of integers or slices') > TypeError: index must be a pair of integers or slices > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From scott.sinclair.za at gmail.com Wed Nov 9 02:20:14 2011 From: scott.sinclair.za at gmail.com (Scott Sinclair) Date: Wed, 9 Nov 2011 09:20:14 +0200 Subject: [SciPy-Dev] [Numpy-discussion] ANN: scipy 0.10 release candidate 1 In-Reply-To: References: Message-ID: On 5 November 2011 20:29, Ralf Gommers wrote: > Please try this release and report problems on the mailing list. > Note: one problem with Python 2.5 (syntax) was discovered after tagging the > release, it's fixed in the 0.10.x branch already so no need to report that > one. For whatever it's worth, no problems on my 64-bit Ubuntu system. Cheers, Scott Running unit tests for scipy NumPy version 1.6.1 NumPy is installed in /home/scott/.local/lib/python2.7/site-packages/numpy SciPy version 0.10.0rc1 SciPy is installed in /home/scott/.virtualenvs/scipy-release-candidates/local/lib/python2.7/site-packages/scipy Python version 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] nose version 1.0.0 ................. Ran 5095 tests in 45.505s OK (KNOWNFAIL=13, SKIP=35) From Per.Brodtkorb at ffi.no Wed Nov 9 02:39:48 2011 From: Per.Brodtkorb at ffi.no (Per.Brodtkorb at ffi.no) Date: Wed, 9 Nov 2011 08:39:48 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: References: <87ipn1le5f.fsf@gmail.com><1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no><871utpl79q.fsf@gmail.com> Message-ID: <1ED225FF18AA8B48AC192F7E1D032C6E0115F791@hbu-posten.ffi.no> ?verst i skjemaet The timings for the original version: In [10]: x = np.arange(10) In [11]: %timeit X,Y = np.meshgrid(x,x) 100000 loops, best of 3: 9.79 us per loop compared to the new proposal: In [12]: %timeit X,Y = meshgrid(x,x) 10000 loops, best of 3: 33.4 us per loop In [13]: %timeit X,Y = meshgrid(x,x, sparse=True) 10000 loops, best of 3: 18.3 us per loop In [14]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False) 10000 loops, best of 3: 15 us per loop In [15]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, indexing='ij') 100000 loops, best of 3: 12.3 us per loop Nederst i skjemaet ?verst i skjemaet Changed 23 hours ago by pbrod However, the timings for the new version is even better when the size of the input vectors are large. The timings for the original version with size=100: In [36]: x = np.arange(100) In [37]: %timeit X,Y = np.meshgrid(x,x) 10000 loops, best of 3: 96.8 us per loop compared to the new proposal: In [38]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=True, indexing='xy') 10000 loops, best of 3: 109 us per loop In [39]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='xy') 100000 loops, best of 3: 18.5 us per loop In [40]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='ij') 100000 loops, best of 3: 15.5 us per loop In [41]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, indexing='ij') 10000 loops, best of 3: 12 us per loop In [42]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=False, indexing='ij') 10000 loops, best of 3: 62.2 us per loop Nederst i skjemaet Per A. Brodtkorb Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Ralf Gommers Sendt: 7. november 2011 22:55 Til: SciPy Developers List Emne: Re: [SciPy-Dev] 3D Meshgrid On Thu, Nov 3, 2011 at 1:28 PM, Antoine Levitt wrote: The version in scitools looks consistent with numpy, compatible with the current API, and useful (in the common use case of a 3D grid, or a rectangular grid with irregular spacing, mgrid and ogrid are not enough) Could someone take a look at it? Looks like a useful improvement in functionality for little added complexity in the interface. So in principle I'm +1. The patch does need tests though, and it would be good if someone could check that the 2-D case doesn't get much slower. Ralf 03/11/11 12:57, Per.Brodtkorb at ffi.no > There is a ticket for this in numpy: > > http://projects.scipy.org/numpy/ticket/966 > > that needs a decision. > > Per A. Brodtkorb > > -----Opprinnelig melding----- > Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Antoine Levitt > Sendt: 3. november 2011 11:00 > Til: scipy-dev at scipy.org > Emne: [SciPy-Dev] 3D Meshgrid > > Hi, > > Could meshgrid be extended to support 3D grids? It's a pretty natural > use case, and would bring it closer to matlab. > > There's some discussion at > http://stackoverflow.com/questions/1827489/numpy-meshgrid-in-3d > > Antoine > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev _______________________________________________ SciPy-Dev mailing list SciPy-Dev at scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Wed Nov 9 15:01:55 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Wed, 9 Nov 2011 21:01:55 +0100 Subject: [SciPy-Dev] [Numpy-discussion] ANN: scipy 0.10 release candidate 1 In-Reply-To: References: Message-ID: On Wed, Nov 9, 2011 at 8:20 AM, Scott Sinclair wrote: > On 5 November 2011 20:29, Ralf Gommers > wrote: > > Please try this release and report problems on the mailing list. > > Note: one problem with Python 2.5 (syntax) was discovered after tagging > the > > release, it's fixed in the 0.10.x branch already so no need to report > that > > one. > > For whatever it's worth, no problems on my 64-bit Ubuntu system. > Thanks, that's definitely worth something. If I don't hear anything, I wonder if there are no problems or if no one is testing. Cheers, Ralf > > Cheers, > Scott > > Running unit tests for scipy > NumPy version 1.6.1 > NumPy is installed in /home/scott/.local/lib/python2.7/site-packages/numpy > SciPy version 0.10.0rc1 > SciPy is installed in > > /home/scott/.virtualenvs/scipy-release-candidates/local/lib/python2.7/site-packages/scipy > Python version 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] > nose version 1.0.0 > ................. > Ran 5095 tests in 45.505s > > OK (KNOWNFAIL=13, SKIP=35) > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cgohlke at uci.edu Wed Nov 9 15:10:37 2011 From: cgohlke at uci.edu (Christoph Gohlke) Date: Wed, 09 Nov 2011 12:10:37 -0800 Subject: [SciPy-Dev] [Numpy-discussion] ANN: scipy 0.10 release candidate 1 In-Reply-To: References: Message-ID: <4EBADE3D.6040209@uci.edu> On 11/9/2011 12:01 PM, Ralf Gommers wrote: > > > On Wed, Nov 9, 2011 at 8:20 AM, Scott Sinclair > > wrote: > > On 5 November 2011 20:29, Ralf Gommers > wrote: > > Please try this release and report problems on the mailing list. > > Note: one problem with Python 2.5 (syntax) was discovered after > tagging the > > release, it's fixed in the 0.10.x branch already so no need to > report that > > one. > > For whatever it's worth, no problems on my 64-bit Ubuntu system. > > > Thanks, that's definitely worth something. If I don't hear anything, I > wonder if there are no problems or if no one is testing. > > Cheers, > Ralf Hi Ralf, the msvc9/MKL builds for win32 and win-amd64 are also working well. Christoph > > > Cheers, > Scott > > Running unit tests for scipy > NumPy version 1.6.1 > NumPy is installed in > /home/scott/.local/lib/python2.7/site-packages/numpy > SciPy version 0.10.0rc1 > SciPy is installed in > /home/scott/.virtualenvs/scipy-release-candidates/local/lib/python2.7/site-packages/scipy > Python version 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53) [GCC 4.5.2] > nose version 1.0.0 > ................. > Ran 5095 tests in 45.505s > > OK (KNOWNFAIL=13, SKIP=35) > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev From ralf.gommers at googlemail.com Wed Nov 9 15:13:10 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Wed, 9 Nov 2011 21:13:10 +0100 Subject: [SciPy-Dev] [Numpy-discussion] ANN: scipy 0.10 release candidate 1 In-Reply-To: <4EBADE3D.6040209@uci.edu> References: <4EBADE3D.6040209@uci.edu> Message-ID: On Wed, Nov 9, 2011 at 9:10 PM, Christoph Gohlke wrote: > > > On 11/9/2011 12:01 PM, Ralf Gommers wrote: > > > > > > On Wed, Nov 9, 2011 at 8:20 AM, Scott Sinclair > > > > wrote: > > > > On 5 November 2011 20:29, Ralf Gommers > > wrote: > > > Please try this release and report problems on the mailing list. > > > Note: one problem with Python 2.5 (syntax) was discovered after > > tagging the > > > release, it's fixed in the 0.10.x branch already so no need to > > report that > > > one. > > > > For whatever it's worth, no problems on my 64-bit Ubuntu system. > > > > > > Thanks, that's definitely worth something. If I don't hear anything, I > > wonder if there are no problems or if no one is testing. > > > > Cheers, > > Ralf > > Hi Ralf, > > the msvc9/MKL builds for win32 and win-amd64 are also working well. > > Christoph > > Great, thanks! Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From bsouthey at gmail.com Wed Nov 9 22:22:30 2011 From: bsouthey at gmail.com (Bruce Southey) Date: Wed, 9 Nov 2011 21:22:30 -0600 Subject: [SciPy-Dev] [Numpy-discussion] ANN: scipy 0.10 release candidate 1 In-Reply-To: References: <4EBADE3D.6040209@uci.edu> Message-ID: On Wed, Nov 9, 2011 at 2:13 PM, Ralf Gommers wrote: > > > On Wed, Nov 9, 2011 at 9:10 PM, Christoph Gohlke wrote: >> >> >> On 11/9/2011 12:01 PM, Ralf Gommers wrote: >> > >> > >> > On Wed, Nov 9, 2011 at 8:20 AM, Scott Sinclair >> > > >> > wrote: >> > >> > ? ? On 5 November 2011 20:29, Ralf Gommers > > ? ? > wrote: >> > ? ? > ?Please try this release and report problems on the mailing list. >> > ? ? > ?Note: one problem with Python 2.5 (syntax) was discovered after >> > ? ? tagging the >> > ? ? > ?release, it's fixed in the 0.10.x branch already so no need to >> > ? ? report that >> > ? ? > ?one. >> > >> > ? ? For whatever it's worth, no problems on my 64-bit Ubuntu system. >> > >> > >> > Thanks, that's definitely worth something. If I don't hear anything, I >> > wonder if there are no problems or if no one is testing. >> > >> > Cheers, >> > Ralf >> >> Hi Ralf, >> >> the msvc9/MKL builds for win32 and win-amd64 are also working well. >> >> Christoph >> > Great, thanks! > > Ralf > > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > Well, According to Sourceforge, some people have downloaded the RC1 in various forms: 25 downloads of the x86 Python 2.5 binary :-) 658 downloads of the x86 Python 2.6 binary 377 downloads of the x86 Python 2.7 binary 278 and 43 of the two source codes. So I would assume that there are no new problems. I have not seen any more failures with Python 2.7, 3.1 and 3.2. Bruce From warren.weckesser at enthought.com Fri Nov 11 08:38:28 2011 From: warren.weckesser at enthought.com (Warren Weckesser) Date: Fri, 11 Nov 2011 07:38:28 -0600 Subject: [SciPy-Dev] [SciPy-User] Ticket #1187: ode crashes if rhs returns a tuple instead of a list In-Reply-To: References: <4EBBE229.105@gmail.com> Message-ID: On Thu, Nov 10, 2011 at 9:05 AM, Tony Yu wrote: > > > On Thu, Nov 10, 2011 at 9:39 AM, Bruce Southey wrote: > >> ** >> On 11/09/2011 04:02 PM, Tony Yu wrote: >> >> I just want to draw attention to the bug report in >> http://projects.scipy.org/scipy/ticket/1187. Basically, >> scipy.integrate.ode takes a function as input, and the error occurs if that >> function returns a tuple (instead of, e.g., a list). >> >> If there isn't a simple fix (I can't tell b/c the error occurs within >> C-code, which I'm not at all proficient in), then I think this should print >> a more informative error message. >> >> >> Best, >> -Tony >> >> >> _______________________________________________ >> SciPy-User mailing listSciPy-User at scipy.orghttp://mail.scipy.org/mailman/listinfo/scipy-user >> >> Ah >> Now I understand, perhaps providing the actual code to the ticket would >> avoid confusion. >> >> Here you are replacing a mutable object with an immutable object so that >> may be an issue. >> > > I was thinking the same; for example, if the input function returns an > array it also works fine. I'm not sure whether the correct behavior is to > simply cast the tuple to a list or to simply raise a more informative > error. Unfortunately, I don't understand the C-code well enough to submit a > patch. > > Looks like a bug in f2py. I've added some comments to the ticket: http://projects.scipy.org/scipy/ticket/1187 Warren > Best, > -Tony > > _______________________________________________ > SciPy-User mailing list > SciPy-User at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-user > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Fri Nov 11 14:50:08 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Fri, 11 Nov 2011 20:50:08 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: <1ED225FF18AA8B48AC192F7E1D032C6E0115F791@hbu-posten.ffi.no> References: <87ipn1le5f.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no> <871utpl79q.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F791@hbu-posten.ffi.no> Message-ID: On Wed, Nov 9, 2011 at 8:39 AM, wrote: > ?verst i skjemaet**** > > The timings for the original version:**** > > In [10]: x = np.arange(10)**** > > In [11]: %timeit X,Y = np.meshgrid(x,x)**** > > 100000 loops, best of 3: 9.79 us per loop**** > > compared to the new proposal:**** > > In [12]: %timeit X,Y = meshgrid(x,x)**** > > 10000 loops, best of 3: 33.4 us per loop**** > > ** ** > > In [13]: %timeit X,Y = meshgrid(x,x, sparse=True)**** > > 10000 loops, best of 3: 18.3 us per loop**** > > ** ** > > In [14]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False)**** > > 10000 loops, best of 3: 15 us per loop**** > > ** ** > > In [15]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, > indexing='ij')**** > > 100000 loops, best of 3: 12.3 us per loop**** > > Nederst i skjemaet**** > > ?verst i skjemaet**** > > Changed 23 hours ago > by pbrod **** > > However, the timings for the new version is even better when the size of > the input vectors are large. The timings for the original version with > size=100:**** > > In [36]: x = np.arange(100)**** > > ** ** > > In [37]: %timeit X,Y = np.meshgrid(x,x)**** > > 10000 loops, best of 3: 96.8 us per loop**** > > compared to the new proposal:**** > > In [38]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=True, > indexing='xy')**** > > 10000 loops, best of 3: 109 us per loop**** > > ** ** > > In [39]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='xy') > **** > > 100000 loops, best of 3: 18.5 us per loop**** > > ** ** > > In [40]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='ij') > **** > > 100000 loops, best of 3: 15.5 us per loop**** > > ** ** > > In [41]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, > indexing='ij')**** > > 10000 loops, best of 3: 12 us per loop**** > > ** ** > > In [42]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=False, > indexing='ij')**** > > 10000 loops, best of 3: 62.2 us per loop**** > > Nederst i skjemaet**** > > ** ** > > ** ** > > *Per A. Brodtkorb* > That looks good. The benchmark for larger arrays is more important I think. +1 on merging this. If you or someone else could add some tests that cover the new functionality and send a pull request, that would be helpful. There are some other small things in the patch that need to be fixed, I'll add those to the ticket. Cheers, Ralf ** > > ** ** > > *Fra:* scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] *P? > vegne av* Ralf Gommers > *Sendt:* 7. november 2011 22:55 > *Til:* SciPy Developers List > *Emne:* Re: [SciPy-Dev] 3D Meshgrid**** > > ** ** > > ** ** > > On Thu, Nov 3, 2011 at 1:28 PM, Antoine Levitt > wrote:**** > > The version in scitools looks consistent with numpy, compatible with the > current API, and useful (in the common use case of a 3D grid, or a > rectangular grid with irregular spacing, mgrid and ogrid are not enough) > > Could someone take a look at it?**** > > > Looks like a useful improvement in functionality for little added > complexity in the interface. So in principle I'm +1. > > The patch does need tests though, and it would be good if someone could > check that the 2-D case doesn't get much slower. > > Ralf > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Sun Nov 13 14:19:48 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Sun, 13 Nov 2011 20:19:48 +0100 Subject: [SciPy-Dev] ANN: SciPy 0.10.0 released Message-ID: Hi all, I am pleased to announce the availability of SciPy 0.10.0. For this release over a 100 tickets and pull requests have been closed, and many new features have been added. Some of the highlights are: - support for Bento as a build system for scipy - generalized and shift-invert eigenvalue problems in sparse.linalg - addition of discrete-time linear systems in the signal module Sources and binaries can be found at , release notes are copied below. Enjoy, The SciPy developers ========================== SciPy 0.10.0 Release Notes ========================== .. contents:: SciPy 0.10.0 is the culmination of 8 months of hard work. It contains many new features, numerous bug-fixes, improved test coverage and better documentation. There have been a limited number of deprecations and backwards-incompatible changes in this release, which are documented below. All users are encouraged to upgrade to this release, as there are a large number of bug-fixes and optimizations. Moreover, our development attention will now shift to bug-fix releases on the 0.10.x branch, and on adding new features on the development master branch. Release highlights: - Support for Bento as optional build system. - Support for generalized eigenvalue problems, and all shift-invert modes available in ARPACK. This release requires Python 2.4-2.7 or 3.1- and NumPy 1.5 or greater. New features ============ Bento: new optional build system -------------------------------- Scipy can now be built with `Bento `_. Bento has some nice features like parallel builds and partial rebuilds, that are not possible with the default build system (distutils). For usage instructions see BENTO_BUILD.txt in the scipy top-level directory. Currently Scipy has three build systems, distutils, numscons and bento. Numscons is deprecated and is planned and will likely be removed in the next release. Generalized and shift-invert eigenvalue problems in ``scipy.sparse.linalg`` --------------------------------------------------------------------------- The sparse eigenvalue problem solver functions ``scipy.sparse.eigs/eigh`` now support generalized eigenvalue problems, and all shift-invert modes available in ARPACK. Discrete-Time Linear Systems (``scipy.signal``) ----------------------------------------------- Support for simulating discrete-time linear systems, including ``scipy.signal.dlsim``, ``scipy.signal.dimpulse``, and ``scipy.signal.dstep``, has been added to SciPy. Conversion of linear systems from continuous-time to discrete-time representations is also present via the ``scipy.signal.cont2discrete`` function. Enhancements to ``scipy.signal`` -------------------------------- A Lomb-Scargle periodogram can now be computed with the new function ``scipy.signal.lombscargle``. The forward-backward filter function ``scipy.signal.filtfilt`` can now filter the data in a given axis of an n-dimensional numpy array. (Previously it only handled a 1-dimensional array.) Options have been added to allow more control over how the data is extended before filtering. FIR filter design with ``scipy.signal.firwin2`` now has options to create filters of type III (zero at zero and Nyquist frequencies) and IV (zero at zero frequency). Additional decomposition options (``scipy.linalg``) --------------------------------------------------- A sort keyword has been added to the Schur decomposition routine (``scipy.linalg.schur``) to allow the sorting of eigenvalues in the resultant Schur form. Additional special matrices (``scipy.linalg``) ---------------------------------------------- The functions ``hilbert`` and ``invhilbert`` were added to ``scipy.linalg``. Enhancements to ``scipy.stats`` ------------------------------- * The *one-sided form* of Fisher's exact test is now also implemented in ``stats.fisher_exact``. * The function ``stats.chi2_contingency`` for computing the chi-square test of independence of factors in a contingency table has been added, along with the related utility functions ``stats.contingency.margins`` and ``stats.contingency.expected_freq``. Basic support for Harwell-Boeing file format for sparse matrices ---------------------------------------------------------------- Both read and write are support through a simple function-based API, as well as a more complete API to control number format. The functions may be found in scipy.sparse.io. The following features are supported: * Read and write sparse matrices in the CSC format * Only real, symmetric, assembled matrix are supported (RUA format) Deprecated features =================== ``scipy.maxentropy`` -------------------- The maxentropy module is unmaintained, rarely used and has not been functioning well for several releases. Therefore it has been deprecated for this release, and will be removed for scipy 0.11. Logistic regression in scikits.learn is a good alternative for this functionality. The ``scipy.maxentropy.logsumexp`` function has been moved to ``scipy.misc``. ``scipy.lib.blas`` ------------------ There are similar BLAS wrappers in ``scipy.linalg`` and ``scipy.lib``. These have now been consolidated as ``scipy.linalg.blas``, and ``scipy.lib.blas`` is deprecated. Numscons build system --------------------- The numscons build system is being replaced by Bento, and will be removed in one of the next scipy releases. Backwards-incompatible changes ============================== The deprecated name `invnorm` was removed from ``scipy.stats.distributions``, this distribution is available as `invgauss`. The following deprecated nonlinear solvers from ``scipy.optimize`` have been removed:: - ``broyden_modified`` (bad performance) - ``broyden1_modified`` (bad performance) - ``broyden_generalized`` (equivalent to ``anderson``) - ``anderson2`` (equivalent to ``anderson``) - ``broyden3`` (obsoleted by new limited-memory broyden methods) - ``vackar`` (renamed to ``diagbroyden``) Other changes ============= ``scipy.constants`` has been updated with the CODATA 2010 constants. ``__all__`` dicts have been added to all modules, which has cleaned up the namespaces (particularly useful for interactive work). An API section has been added to the documentation, giving recommended import guidelines and specifying which submodules are public and which aren't. Authors ======= This release contains work by the following people (contributed at least one patch to this release, names in alphabetical order): * Jeff Armstrong + * Matthew Brett * Lars Buitinck + * David Cournapeau * FI$H 2000 + * Michael McNeil Forbes + * Matty G + * Christoph Gohlke * Ralf Gommers * Yaroslav Halchenko * Charles Harris * Thouis (Ray) Jones + * Chris Jordan-Squire + * Robert Kern * Chris Lasher + * Wes McKinney + * Travis Oliphant * Fabian Pedregosa * Josef Perktold * Thomas Robitaille + * Pim Schellart + * Anthony Scopatz + * Skipper Seabold + * Fazlul Shahriar + * David Simcha + * Scott Sinclair + * Andrey Smirnov + * Collin RM Stocks + * Martin Teichmann + * Jake Vanderplas + * Ga?l Varoquaux + * Pauli Virtanen * Stefan van der Walt * Warren Weckesser * Mark Wiebe + A total of 35 people contributed to this release. People with a "+" by their names contributed a patch for the first time. -------------- next part -------------- An HTML attachment was scrubbed... URL: From Per.Brodtkorb at ffi.no Mon Nov 14 07:42:13 2011 From: Per.Brodtkorb at ffi.no (Per.Brodtkorb at ffi.no) Date: Mon, 14 Nov 2011 13:42:13 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: References: <87ipn1le5f.fsf@gmail.com><1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no><871utpl79q.fsf@gmail.com><1ED225FF18AA8B48AC192F7E1D032C6E0115F791@hbu-posten.ffi.no> Message-ID: <1ED225FF18AA8B48AC192F7E1D032C6E0115F793@hbu-posten.ffi.no> Hi, I have added a new patch that incorporates the suggestions from Ralf as well as tests for the sparse=True and indexing=ij cases at http://projects.scipy.org/numpy/ticket/966 . If someone could have look at it, that would be great. Per A. Brodtkorb Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Ralf Gommers Sendt: 11. november 2011 20:50 Til: SciPy Developers List Emne: Re: [SciPy-Dev] 3D Meshgrid On Wed, Nov 9, 2011 at 8:39 AM, wrote: ?verst i skjemaet The timings for the original version: In [10]: x = np.arange(10) In [11]: %timeit X,Y = np.meshgrid(x,x) 100000 loops, best of 3: 9.79 us per loop compared to the new proposal: In [12]: %timeit X,Y = meshgrid(x,x) 10000 loops, best of 3: 33.4 us per loop In [13]: %timeit X,Y = meshgrid(x,x, sparse=True) 10000 loops, best of 3: 18.3 us per loop In [14]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False) 10000 loops, best of 3: 15 us per loop In [15]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, indexing='ij') 100000 loops, best of 3: 12.3 us per loop Nederst i skjemaet ?verst i skjemaet Changed 23 hours ago by pbrod However, the timings for the new version is even better when the size of the input vectors are large. The timings for the original version with size=100: In [36]: x = np.arange(100) In [37]: %timeit X,Y = np.meshgrid(x,x) 10000 loops, best of 3: 96.8 us per loop compared to the new proposal: In [38]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=True, indexing='xy') 10000 loops, best of 3: 109 us per loop In [39]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='xy') 100000 loops, best of 3: 18.5 us per loop In [40]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='ij') 100000 loops, best of 3: 15.5 us per loop In [41]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, indexing='ij') 10000 loops, best of 3: 12 us per loop In [42]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=False, indexing='ij') 10000 loops, best of 3: 62.2 us per loop Nederst i skjemaet Per A. Brodtkorb That looks good. The benchmark for larger arrays is more important I think. +1 on merging this. If you or someone else could add some tests that cover the new functionality and send a pull request, that would be helpful. There are some other small things in the patch that need to be fixed, I'll add those to the ticket. Cheers, Ralf Fra: scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] P? vegne av Ralf Gommers Sendt: 7. november 2011 22:55 Til: SciPy Developers List Emne: Re: [SciPy-Dev] 3D Meshgrid On Thu, Nov 3, 2011 at 1:28 PM, Antoine Levitt wrote: The version in scitools looks consistent with numpy, compatible with the current API, and useful (in the common use case of a 3D grid, or a rectangular grid with irregular spacing, mgrid and ogrid are not enough) Could someone take a look at it? Looks like a useful improvement in functionality for little added complexity in the interface. So in principle I'm +1. The patch does need tests though, and it would be good if someone could check that the 2-D case doesn't get much slower. Ralf -------------- next part -------------- An HTML attachment was scrubbed... URL: From ralf.gommers at googlemail.com Mon Nov 14 15:04:28 2011 From: ralf.gommers at googlemail.com (Ralf Gommers) Date: Mon, 14 Nov 2011 21:04:28 +0100 Subject: [SciPy-Dev] 3D Meshgrid In-Reply-To: <1ED225FF18AA8B48AC192F7E1D032C6E0115F793@hbu-posten.ffi.no> References: <87ipn1le5f.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F78A@hbu-posten.ffi.no> <871utpl79q.fsf@gmail.com> <1ED225FF18AA8B48AC192F7E1D032C6E0115F791@hbu-posten.ffi.no> <1ED225FF18AA8B48AC192F7E1D032C6E0115F793@hbu-posten.ffi.no> Message-ID: On Mon, Nov 14, 2011 at 1:42 PM, wrote: > Hi, **** > > ** ** > > I have added a new patch that incorporates the suggestions from Ralf as > well as tests for the sparse=True and indexing=ij cases at > http://projects.scipy.org/numpy/ticket/966.**** > > ** ** > > If someone could have look at it, that would be great. > Looks good based on a quick browse. I'd remove the ndgrid function though, it doesn't add anything extra and the numpy namespace is large enough. I have no time to test/merge this for a couple of weeks, so if someone wants to do so please go ahead. Last suggestion for a change: mention this enhancement in the release notes for 2.0.0 (found under doc/release/) and add yourself to the list of contributors in THANKS.txt. Cheers, Ralf **** > > ** ** > > Per A. Brodtkorb**** > > ** ** > > *Fra:* scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] *P? > vegne av* Ralf Gommers > *Sendt:* 11. november 2011 20:50 > > *Til:* SciPy Developers List > *Emne:* Re: [SciPy-Dev] 3D Meshgrid**** > > ** ** > > ** ** > > On Wed, Nov 9, 2011 at 8:39 AM, wrote:**** > > ?verst i skjemaet**** > > The timings for the original version:**** > > In [10]: x = np.arange(10)**** > > In [11]: %timeit X,Y = np.meshgrid(x,x)**** > > 100000 loops, best of 3: 9.79 us per loop**** > > compared to the new proposal:**** > > In [12]: %timeit X,Y = meshgrid(x,x)**** > > 10000 loops, best of 3: 33.4 us per loop**** > > **** > > In [13]: %timeit X,Y = meshgrid(x,x, sparse=True)**** > > 10000 loops, best of 3: 18.3 us per loop**** > > **** > > In [14]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False)**** > > 10000 loops, best of 3: 15 us per loop**** > > **** > > In [15]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, > indexing='ij')**** > > 100000 loops, best of 3: 12.3 us per loop**** > > Nederst i skjemaet**** > > ?verst i skjemaet**** > > Changed 23 hours ago > by pbrod **** > > However, the timings for the new version is even better when the size of > the input vectors are large. The timings for the original version with > size=100:**** > > In [36]: x = np.arange(100)**** > > **** > > In [37]: %timeit X,Y = np.meshgrid(x,x)**** > > 10000 loops, best of 3: 96.8 us per loop**** > > compared to the new proposal:**** > > In [38]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=True, > indexing='xy')**** > > 10000 loops, best of 3: 109 us per loop**** > > **** > > In [39]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='xy') > **** > > 100000 loops, best of 3: 18.5 us per loop**** > > **** > > In [40]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=True, indexing='ij') > **** > > 100000 loops, best of 3: 15.5 us per loop**** > > **** > > In [41]: %timeit X,Y = meshgrid(x,x, sparse=True, copy=False, > indexing='ij')**** > > 10000 loops, best of 3: 12 us per loop**** > > **** > > In [42]: %timeit X,Y = meshgrid(x,x, sparse=False, copy=False, > indexing='ij')**** > > 10000 loops, best of 3: 62.2 us per loop**** > > Nederst i skjemaet**** > > **** > > **** > > *Per A. Brodtkorb***** > > > That looks good. The benchmark for larger arrays is more important I > think. > > +1 on merging this. If you or someone else could add some tests that cover > the new functionality and send a pull request, that would be helpful. There > are some other small things in the patch that need to be fixed, I'll add > those to the ticket. > > Cheers, > Ralf**** > > **** > > *Fra:* scipy-dev-bounces at scipy.org [mailto:scipy-dev-bounces at scipy.org] *P? > vegne av* Ralf Gommers > *Sendt:* 7. november 2011 22:55 > *Til:* SciPy Developers List > *Emne:* Re: [SciPy-Dev] 3D Meshgrid**** > > **** > > **** > > On Thu, Nov 3, 2011 at 1:28 PM, Antoine Levitt > wrote:**** > > The version in scitools looks consistent with numpy, compatible with the > current API, and useful (in the common use case of a 3D grid, or a > rectangular grid with irregular spacing, mgrid and ogrid are not enough) > > Could someone take a look at it?**** > > > Looks like a useful improvement in functionality for little added > complexity in the interface. So in principle I'm +1. > > The patch does need tests though, and it would be good if someone could > check that the 2-D case doesn't get much slower. > > Ralf**** > > ** ** > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From derek at astro.physik.uni-goettingen.de Wed Nov 16 10:47:06 2011 From: derek at astro.physik.uni-goettingen.de (Derek Homeier) Date: Wed, 16 Nov 2011 16:47:06 +0100 Subject: [SciPy-Dev] [Numpy-discussion] ANN: SciPy 0.10.0 released In-Reply-To: References: Message-ID: <273E02AA-0C7D-4F46-BDAD-D15CD35E021E@astro.physik.uni-goettingen.de> On 14 Nov 2011, at 20:54, Ralf Gommers wrote: > On Mon, Nov 14, 2011 at 3:04 PM, Jean-Baptiste Marquette wrote: > > Le 13 nov. 2011 ? 20:19, Ralf Gommers a ?crit : > >> I am pleased to announce the availability of SciPy 0.10.0. > > Hi all, > > Thanks for this great job. > I've run nosetests on my Mac (64-bit 10.7.2 build on EPD) which fails on the following test: > > test_definition (test_basic.TestDoubleIFFT) ... FAIL > test_definition_real (test_basic.TestDoubleIFFT) ... ok > test_djbfft (test_basic.TestDoubleIFFT) ... python(60968) malloc: *** error for object 0x105435b58: incorrect checksum for freed object - object was probably modified after being freed. > *** set a breakpoint in malloc_error_break to debug > Abort trap: 6 > > The exact same issue was just reported on scipy-user, thread "test issues with 0.10". Can you please move the follow-up over there? > > What compilers did you use? And do you know if EPD was built with the same compilers? > > The error looks the same as the problem we still have with scipy.sparse under 64-bit python 2.7 (http://projects.scipy.org/scipy/ticket/1523), related to the Apple Accelerate Framework being broken. The problem doesn't exist on OS X 10.6 though, so it could be Apple broke it for 10.7 or it could be compiler related. > fwiw I've compiled 0.10.0 both on 10.7 and 10.5/ppc, 9 test failures just like on 10.6/x86_64 but defintitely no segfaults or the like - so this rather seems to be a compiler issue. Cheers, Derek From michauxkelley at gmail.com Thu Nov 17 12:51:17 2011 From: michauxkelley at gmail.com (Michaux Kelley) Date: Thu, 17 Nov 2011 17:51:17 +0000 (UTC) Subject: [SciPy-Dev] installation of scipy on Mac OS X 10.7 References: Message-ID: I upgraded to Lion rather than doing a clean install, and I'd previously installed the fortran compiler, but I found that to get scipy on my machine I had to download and install the one listed for Lion in the scipy web site instructions (I think homebrew works for this too). Just an FYI for all you troubleshooters out there. http://www.scipy.org/Installing_SciPy/Mac_OS_X From thouis at gmail.com Fri Nov 18 05:47:40 2011 From: thouis at gmail.com (Thouis (Ray) Jones) Date: Fri, 18 Nov 2011 11:47:40 +0100 Subject: [SciPy-Dev] installation of scipy on Mac OS X 10.7 In-Reply-To: References: Message-ID: On Sat, Sep 10, 2011 at 22:15, Ralf Gommers wrote: > On Fri, Sep 9, 2011 at 3:15 PM, Samuel John wrote: >> There is (not yet) a homebrew script. Do we want one? >> > That may be useful. I'm not a user of homebrew myself, but have only heard > good things about it so far. So please go for it! I've been working on a homebrew script that creates a virtualenv with numpy/scipy/matplotlib and a few other dependencies as part of the CellProfiler project. It has some constraints specific to our project, but it might be useful to someone else trying to make a more general homebrew recipe. The homebrew fork is here: https://github.com/thouis/homebrew The recipe is 'cellprofiler-dev'. Ray Jones From d.s.seljebotn at astro.uio.no Fri Nov 18 06:19:43 2011 From: d.s.seljebotn at astro.uio.no (Dag Sverre Seljebotn) Date: Fri, 18 Nov 2011 12:19:43 +0100 Subject: [SciPy-Dev] BSD C port of FFTPACK incl. bluestein algorithm Message-ID: <4EC63F4F.7030405@astro.uio.no> I've been in touch with Martin Reinecke, author of the libpsht code for spherical harmonic transforms, about licensing issues. libpsht itself will remain under the GPL, but he is likely to release his C port of FFTPACK under BSD in the near future, as it is based on the public domain FFTPACK. I'm grateful for this change for my own purposes (allows releasing my own competing SHT library under the BSD) -- but it could perhaps be useful for NumPy or SciPy as well, depending on how complete the port is? E.g., perhaps make numpy.fft more complete (is the numpy.fft/scipy.fftpack split simply because of the Fortran dependency?). Not sure about whether all of FFTPACK or a subset is included, but it does include a Bluestein implementation in addition. http://libpsht.svn.sourceforge.net/viewvc/libpsht/libfftpack/ Dag Sverre From robert.kern at gmail.com Fri Nov 18 06:42:50 2011 From: robert.kern at gmail.com (Robert Kern) Date: Fri, 18 Nov 2011 11:42:50 +0000 Subject: [SciPy-Dev] [Numpy-discussion] BSD C port of FFTPACK incl. bluestein algorithm In-Reply-To: <4EC63F4F.7030405@astro.uio.no> References: <4EC63F4F.7030405@astro.uio.no> Message-ID: On Fri, Nov 18, 2011 at 11:19, Dag Sverre Seljebotn wrote: > I've been in touch with Martin Reinecke, author of the libpsht code for > spherical harmonic transforms, about licensing issues. > > libpsht itself will remain under the GPL, but he is likely to release > his C port of FFTPACK under BSD in the near future, as it is based on > the public domain FFTPACK. > > I'm grateful for this change for my own purposes (allows releasing my > own competing SHT library under the BSD) -- but it could perhaps be > useful for NumPy or SciPy as well, depending on how complete the port > is? E.g., perhaps make numpy.fft more complete (is the > numpy.fft/scipy.fftpack split simply because of the Fortran dependency?). It used to be the case that scipy.fftpack allowed one to build against multiple different, usually faster, FFT libraries like FFTW. I think we have backed away from that since the cost of maintaining the build configuration for all of those different backends was so high. It's worth noting that numpy.fft is already using a C translation of FFTPACK. I'm not sure what the differences are between this translation and Martin's. -- 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 From cournape at gmail.com Fri Nov 18 06:58:54 2011 From: cournape at gmail.com (David Cournapeau) Date: Fri, 18 Nov 2011 11:58:54 +0000 Subject: [SciPy-Dev] [Numpy-discussion] BSD C port of FFTPACK incl. bluestein algorithm In-Reply-To: References: <4EC63F4F.7030405@astro.uio.no> Message-ID: On Fri, Nov 18, 2011 at 11:42 AM, Robert Kern wrote: > On Fri, Nov 18, 2011 at 11:19, Dag Sverre Seljebotn > wrote: >> I've been in touch with Martin Reinecke, author of the libpsht code for >> spherical harmonic transforms, about licensing issues. >> >> libpsht itself will remain under the GPL, but he is likely to release >> his C port of FFTPACK under BSD in the near future, as it is based on >> the public domain FFTPACK. >> >> I'm grateful for this change for my own purposes (allows releasing my >> own competing SHT library under the BSD) -- but it could perhaps be >> useful for NumPy or SciPy as well, depending on how complete the port >> is? E.g., perhaps make numpy.fft more complete (is the >> numpy.fft/scipy.fftpack split simply because of the Fortran dependency?). > > It used to be the case that scipy.fftpack allowed one to build against > multiple different, usually faster, FFT libraries like FFTW. I think > we have backed away from that since the cost of maintaining the build > configuration for all of those different backends was so high. It's > worth noting that numpy.fft is already using a C translation of > FFTPACK. I'm not sure what the differences are between this > translation and Martin's. Having a Bluestein transformation alone would be worthwhile, as it would avoid the N^2 penalty for prime sizes. I am wondering about precision issues, though (when I tried implementing bluestein transforms on top of fftpack, it gave very bad results numerically-wise). A comparison with fftw would be good here. regards, David From d.s.seljebotn at astro.uio.no Fri Nov 18 07:18:10 2011 From: d.s.seljebotn at astro.uio.no (Dag Sverre Seljebotn) Date: Fri, 18 Nov 2011 13:18:10 +0100 Subject: [SciPy-Dev] [Numpy-discussion] BSD C port of FFTPACK incl. bluestein algorithm In-Reply-To: References: <4EC63F4F.7030405@astro.uio.no> Message-ID: <4EC64D02.5000007@astro.uio.no> On 11/18/2011 12:58 PM, David Cournapeau wrote: > On Fri, Nov 18, 2011 at 11:42 AM, Robert Kern wrote: >> On Fri, Nov 18, 2011 at 11:19, Dag Sverre Seljebotn >> wrote: >>> I've been in touch with Martin Reinecke, author of the libpsht code for >>> spherical harmonic transforms, about licensing issues. >>> >>> libpsht itself will remain under the GPL, but he is likely to release >>> his C port of FFTPACK under BSD in the near future, as it is based on >>> the public domain FFTPACK. >>> >>> I'm grateful for this change for my own purposes (allows releasing my >>> own competing SHT library under the BSD) -- but it could perhaps be >>> useful for NumPy or SciPy as well, depending on how complete the port >>> is? E.g., perhaps make numpy.fft more complete (is the >>> numpy.fft/scipy.fftpack split simply because of the Fortran dependency?). >> >> It used to be the case that scipy.fftpack allowed one to build against >> multiple different, usually faster, FFT libraries like FFTW. I think >> we have backed away from that since the cost of maintaining the build >> configuration for all of those different backends was so high. It's >> worth noting that numpy.fft is already using a C translation of >> FFTPACK. I'm not sure what the differences are between this >> translation and Martin's. Here's some more info forwarded from Martin: """ - only FFTs are supported (no DCTs/DSTs) - only double precision is supported (extension to single precision might not be much work, though) - both complex and real FFTs are supported - real FFTs allow various storage schemes for the (half)complex frequency domain data (classic FFTPACK scheme, FFTW or halfcomplex scheme, uncompressed complex storage) - precision of transforms involving large prime factors should be slightly better than with original FFTPACK - Bluestein's algorithm is automatically selected if considered profitable - small accuracy self-testing code is provided. Fairly complete interface documentation is available in Doxygen format. I'll prepare a source package later in the afternoon and send it around. Best regards, Martin """ > > Having a Bluestein transformation alone would be worthwhile, as it > would avoid the N^2 penalty for prime sizes. > > I am wondering about precision issues, though (when I tried > implementing bluestein transforms on top of fftpack, it gave very bad > results numerically-wise). A comparison with fftw would be good here. Well, there's an indirect comparison: My SHT code currently uses FFTW3, and it manages to agree with Reinecke's SHT code to a precision of better than ~1e-12 for full SHTs. That includes several other sources of errors though. (That's an average over several different-sized FFTs, of which half has n=8192 and the other half all have different size, starting from 4 and increasing up to 8192 in steps of 4 -- meaning prime factors on the order of 1000). I agree, a more direct comparison with FFTW would be good. In more detail from the README: I replaced the iterative sine and cosine calculations in radfg() and radbg() 17 by an exact calculation, which slightly improves the transform accuracy for 18 real FFTs with lengths containing large prime factors. Dag Sverre From d.s.seljebotn at astro.uio.no Fri Nov 18 11:22:02 2011 From: d.s.seljebotn at astro.uio.no (Dag Sverre Seljebotn) Date: Fri, 18 Nov 2011 17:22:02 +0100 Subject: [SciPy-Dev] [Numpy-discussion] BSD C port of FFTPACK incl. bluestein algorithm In-Reply-To: <4EC64D02.5000007@astro.uio.no> References: <4EC63F4F.7030405@astro.uio.no> <4EC64D02.5000007@astro.uio.no> Message-ID: <4EC6862A.8090909@astro.uio.no> On 11/18/2011 01:18 PM, Dag Sverre Seljebotn wrote: > On 11/18/2011 12:58 PM, David Cournapeau wrote: >> On Fri, Nov 18, 2011 at 11:42 AM, Robert Kern wrote: >>> On Fri, Nov 18, 2011 at 11:19, Dag Sverre Seljebotn >>> wrote: >>>> I've been in touch with Martin Reinecke, author of the libpsht code for >>>> spherical harmonic transforms, about licensing issues. >>>> >>>> libpsht itself will remain under the GPL, but he is likely to release >>>> his C port of FFTPACK under BSD in the near future, as it is based on >>>> the public domain FFTPACK. >>>> >>>> I'm grateful for this change for my own purposes (allows releasing my >>>> own competing SHT library under the BSD) -- but it could perhaps be >>>> useful for NumPy or SciPy as well, depending on how complete the port >>>> is? E.g., perhaps make numpy.fft more complete (is the >>>> numpy.fft/scipy.fftpack split simply because of the Fortran dependency?). >>> >>> It used to be the case that scipy.fftpack allowed one to build against >>> multiple different, usually faster, FFT libraries like FFTW. I think >>> we have backed away from that since the cost of maintaining the build >>> configuration for all of those different backends was so high. It's >>> worth noting that numpy.fft is already using a C translation of >>> FFTPACK. I'm not sure what the differences are between this >>> translation and Martin's. > > Here's some more info forwarded from Martin: > > """ > - only FFTs are supported (no DCTs/DSTs) > - only double precision is supported (extension to single precision might > not be much work, though) > - both complex and real FFTs are supported > - real FFTs allow various storage schemes for the (half)complex frequency > domain data (classic FFTPACK scheme, FFTW or halfcomplex scheme, > uncompressed complex storage) > - precision of transforms involving large prime factors should be slightly > better than with original FFTPACK > - Bluestein's algorithm is automatically selected if considered profitable > - small accuracy self-testing code is provided. > > Fairly complete interface documentation is available in Doxygen format. > I'll prepare a source package later in the afternoon and send it around. OK, Martin sent me a BSD-ed version of his libfftpack, and I stuck it on github: https://github.com/dagss/libfftpack Note that ls_fft.h contains Martin's API for it (plan construction and execution etc.) Dag Sverre From moritz.beber at googlemail.com Fri Nov 18 14:11:15 2011 From: moritz.beber at googlemail.com (Moritz Emanuel Beber) Date: Fri, 18 Nov 2011 20:11:15 +0100 Subject: [SciPy-Dev] data rankings Message-ID: <4EC6ADD3.4070108@gmail.com> Dear all, I recently had to rank some data and I came across the scipy.stats.rankdata function. It didn't quite do what I wanted (using the terminology of this wikipedia page http://en.wikipedia.org/wiki/Ranking it performs 'fractional' ranking) so I went ahead and wrote functions for the other types of rankings. So, is there any interest in my contributing this code? If yes, can you point me to guidelines on how to submit it? I didn't find any hints for that online. Cheers, Moritz From josef.pktd at gmail.com Fri Nov 18 14:37:40 2011 From: josef.pktd at gmail.com (josef.pktd at gmail.com) Date: Fri, 18 Nov 2011 14:37:40 -0500 Subject: [SciPy-Dev] data rankings In-Reply-To: <4EC6ADD3.4070108@gmail.com> References: <4EC6ADD3.4070108@gmail.com> Message-ID: On Fri, Nov 18, 2011 at 2:11 PM, Moritz Emanuel Beber wrote: > Dear all, > > I recently had to rank some data and I came across the > scipy.stats.rankdata function. It didn't quite do what I wanted (using > the terminology of this wikipedia page > http://en.wikipedia.org/wiki/Ranking it performs 'fractional' ranking) > so I went ahead and wrote functions for the other types of rankings. rankdata is mostly a support function for the rank based tests, see http://en.wikipedia.org/wiki/Ranking#Ranking_in_statistics There is also percentileofscore in stats with more options, but doesn't do full ranking, but I think could also be rewritten and expanded. I think, the main question whether other rankings should be included, is whether it cannot be simply done with numpy.searchsorted. > > So, is there any interest in my contributing this code? If yes, can you > point me to guidelines on how to submit it? I didn't find any hints for > that online. some information for contributing is here http://projects.scipy.org/scipy/wiki I haven't looked at this in a long time contribute seems to require login, the other links redirect to the source files on github that are rst, rendered as html. The best way now is to open a pull request on github. Thanks, Josef > > Cheers, > Moritz > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > From warren.weckesser at enthought.com Fri Nov 18 17:37:29 2011 From: warren.weckesser at enthought.com (Warren Weckesser) Date: Fri, 18 Nov 2011 16:37:29 -0600 Subject: [SciPy-Dev] data rankings In-Reply-To: References: <4EC6ADD3.4070108@gmail.com> Message-ID: On Fri, Nov 18, 2011 at 1:37 PM, wrote: > On Fri, Nov 18, 2011 at 2:11 PM, Moritz Emanuel Beber > wrote: > > Dear all, > > > > I recently had to rank some data and I came across the > > scipy.stats.rankdata function. It didn't quite do what I wanted (using > > the terminology of this wikipedia page > > http://en.wikipedia.org/wiki/Ranking it performs 'fractional' ranking) > > so I went ahead and wrote functions for the other types of rankings. > > rankdata is mostly a support function for the rank based tests, see > http://en.wikipedia.org/wiki/Ranking#Ranking_in_statistics > > rankdata is also pretty slow. I have a cythonized version working (along with tiecorrection), but it is not quite ready for a pull request. If there is interest, I don't see any reason to not include more ranking functions in scipy. Moritz, what are the use-cases for the ranking that you used? Warren > There is also percentileofscore in stats with more options, but > doesn't do full ranking, but I think could also be rewritten and > expanded. > > I think, the main question whether other rankings should be included, > is whether it cannot be simply done with numpy.searchsorted. > > > > > > So, is there any interest in my contributing this code? If yes, can you > > point me to guidelines on how to submit it? I didn't find any hints for > > that online. > > some information for contributing is here > http://projects.scipy.org/scipy/wiki > I haven't looked at this in a long time > contribute seems to require login, the other links redirect to the > source files on github that are rst, rendered as html. > > The best way now is to open a pull request on github. > > Thanks, > > Josef > > > > Cheers, > > Moritz > > _______________________________________________ > > SciPy-Dev mailing list > > SciPy-Dev at scipy.org > > http://mail.scipy.org/mailman/listinfo/scipy-dev > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From moritz.beber at googlemail.com Sat Nov 19 07:36:55 2011 From: moritz.beber at googlemail.com (Moritz Emanuel Beber) Date: Sat, 19 Nov 2011 13:36:55 +0100 Subject: [SciPy-Dev] data rankings In-Reply-To: References: <4EC6ADD3.4070108@gmail.com> Message-ID: <4EC7A2E7.7020403@gmail.com> Hi, > > rankdata is also pretty slow. I have a cythonized version working > (along with tiecorrection), but it is not quite ready for a pull request. rankdata currently uses a lot of look-ups, so far I don't see how they can be avoided. I used numpy.unique for one of the rankings so it doesn't need those look-ups but it's actually a bit slower so I guess they're done internally. > If there is interest, I don't see any reason to not include more > ranking functions in scipy. Moritz, what are the use-cases for the > ranking that you used? > I use the ranking to compare some dynamical data on different networks. The data are on different scales and cover varying orders of magnitude so I used a ranking to make them at all comparable. It's quite trivial really but I wanted ties to have the same rank no matter how many duplicates there are. Best, Moritz From krzysztof.berniak at gmail.com Tue Nov 22 15:56:05 2011 From: krzysztof.berniak at gmail.com (Krzysztof Berniak) Date: Tue, 22 Nov 2011 21:56:05 +0100 Subject: [SciPy-Dev] parameters of fitting data Message-ID: Hello, I'm writing script in python, which fitting exponencial curve to data ( f(x) = a*exp(x*b). To resolve this problem I use scipy. It works fine. I get in v1 new parameters, but where is calculation errors of this parameters ? When I use gnuplot my results look like this: Final set of parameters Asymptotic Standard Error ======================= ========================== a1 = 12.1566 +/- 0.2286 (1.88%) b1 = 0.000858396 +/- 4.362e-006 (0.5082%) ^ | where in scipy i get this numbers This is my code def main(): z,f = numbers_col() fitfunc = lambda v, z: v[0]*exp(z*v[1]) errfunc = lambda v, z,f: fitfunc(v,z) - f v0 = [10., 0.005] v1,success = optimize.leastsq(errfunc, v0[:], args = (z,f),full_output=True) regards and please help, Cristopher -------------- next part -------------- An HTML attachment was scrubbed... URL: From josef.pktd at gmail.com Tue Nov 22 17:22:57 2011 From: josef.pktd at gmail.com (josef.pktd at gmail.com) Date: Tue, 22 Nov 2011 17:22:57 -0500 Subject: [SciPy-Dev] parameters of fitting data In-Reply-To: References: Message-ID: On Tue, Nov 22, 2011 at 3:56 PM, Krzysztof Berniak wrote: > Hello, > ??I'm writing script in python, which fitting exponencial curve to data ( > f(x) = a*exp(x*b). > ?To resolve this problem I use scipy. > ?It works fine. I get in v1 new parameters, but where is calculation errors > of this parameters ? > When I use gnuplot my results look like this: > Final set of parameters ? ? ? ? ? ?Asymptotic Standard Error > ======================= ? ? ? ? ? ?========================== > a1 ? ? ? ? ? ? ?= 12.1566 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +/- 0.2286 > (1.88%) > b1 ? ? ? ? ? ? ?= 0.000858396 ? ? ? ? ? ? ? ? ? ? ? ? ? +/- 4.362e-006 > (0.5082%) > > ? ^ > > > ? | > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?where in > scipy i get this numbers > This is my code > def main(): > ? ? z,f = numbers_col() > ? ??fitfunc = lambda v, z: v[0]*exp(z*v[1]) > ? ? errfunc = lambda v, z,f: fitfunc(v,z) - f > ? ? v0 = [10., 0.005] > ? ? v1,success = optimize.leastsq(errfunc, v0[:], args = > (z,f),full_output=True) > regards and please help, > Cristopher use optimize.curvefit which returns the covariance matrix for the parameter estimates, and np.sqrt(np.diag(cov)) gives the standard errors for each parameter estimate. Josef > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > From zunzun at zunzun.com Tue Nov 22 17:23:39 2011 From: zunzun at zunzun.com (James Phillips) Date: Tue, 22 Nov 2011 16:23:39 -0600 Subject: [SciPy-Dev] parameters of fitting data In-Reply-To: References: Message-ID: I dug up some old code that should point you in the right direction. Look over the ODR example in scipy and this should make some sense to you. # see both scipy.odr.odrpack and http://www.scipy.org/Cookbook/OLS # this is inefficient but works for every possible case model = scipy.odr.odrpack.Model(function) data = scipy.odr.odrpack.Data(indepData, depData]) myodr = scipy.odr.odrpack.ODR(data, model, beta0=solvedCoefficients, maxit=0) myodr.set_job(fit_type=2) parameterStatistics = myodr.run() self.cov_beta = parameterStatistics.cov_beta # parameter covariance matrix try: self.sd_beta = parameterStatistics.sd_beta * parameterStatistics.sd_beta except: self.sd_beta = None self.ci = [] # 95% confidence intervals t_df = scipy.stats.t.ppf(0.975, self.df_e) for i in range(len(self.solvedCoefficients)): self.ci.append([self.solvedCoefficients[i] - t_df * parameterStatistics.sd_beta[i], self.solvedCoefficients[i] + t_df * parameterStatistics.sd_beta[i]]) try: self.tstat_beta = self.solvedCoefficients / parameterStatistics.sd_beta # coeff t-statistics except: self.tstat_beta = None try: self.pstat_beta = (1.0 - scipy.stats.t.cdf(numpy.abs(self.tstat_beta), self.df_e)) * 2.0 # coef. p-values except: self.pstat_beta = None James http://zunzun.com On Tue, Nov 22, 2011 at 2:56 PM, Krzysztof Berniak < krzysztof.berniak at gmail.com> wrote: > Hello, > I'm writing script in python, which fitting exponencial curve to data ( > f(x) = a*exp(x*b). > To resolve this problem I use scipy. > It works fine. I get in v1 new parameters, but where is calculation > errors of this parameters ? > > When I use gnuplot my results look like this: > Final set of parameters Asymptotic Standard Error > ======================= ========================== > > a1 = 12.1566 +/- 0.2286 > (1.88%) > b1 = 0.000858396 +/- 4.362e-006 > (0.5082%) > > ^ > > > | > where in > scipy i get this numbers > > This is my code > def main(): > z,f = numbers_col() > fitfunc = lambda v, z: v[0]*exp(z*v[1]) > errfunc = lambda v, z,f: fitfunc(v,z) - f > v0 = [10., 0.005] > v1,success = optimize.leastsq(errfunc, v0[:], args = > (z,f),full_output=True) > > regards and please help, > Cristopher > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From josef.pktd at gmail.com Tue Nov 22 17:24:26 2011 From: josef.pktd at gmail.com (josef.pktd at gmail.com) Date: Tue, 22 Nov 2011 17:24:26 -0500 Subject: [SciPy-Dev] parameters of fitting data In-Reply-To: References: Message-ID: On Tue, Nov 22, 2011 at 5:22 PM, wrote: > On Tue, Nov 22, 2011 at 3:56 PM, Krzysztof Berniak > wrote: >> Hello, >> ??I'm writing script in python, which fitting exponencial curve to data ( >> f(x) = a*exp(x*b). >> ?To resolve this problem I use scipy. >> ?It works fine. I get in v1 new parameters, but where is calculation errors >> of this parameters ? >> When I use gnuplot my results look like this: >> Final set of parameters ? ? ? ? ? ?Asymptotic Standard Error >> ======================= ? ? ? ? ? ?========================== >> a1 ? ? ? ? ? ? ?= 12.1566 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? +/- 0.2286 >> (1.88%) >> b1 ? ? ? ? ? ? ?= 0.000858396 ? ? ? ? ? ? ? ? ? ? ? ? ? +/- 4.362e-006 >> (0.5082%) >> >> ? ^ >> >> >> ? | >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?where in >> scipy i get this numbers >> This is my code >> def main(): >> ? ? z,f = numbers_col() >> ? ??fitfunc = lambda v, z: v[0]*exp(z*v[1]) >> ? ? errfunc = lambda v, z,f: fitfunc(v,z) - f >> ? ? v0 = [10., 0.005] >> ? ? v1,success = optimize.leastsq(errfunc, v0[:], args = >> (z,f),full_output=True) >> regards and please help, >> Cristopher > > use optimize.curvefit curve_fit Josef which returns the covariance matrix for the > parameter estimates, and np.sqrt(np.diag(cov)) gives the standard > errors for each parameter estimate. > > Josef > >> _______________________________________________ >> SciPy-Dev mailing list >> SciPy-Dev at scipy.org >> http://mail.scipy.org/mailman/listinfo/scipy-dev >> >> > From pierre.haessig at crans.org Thu Nov 24 07:49:52 2011 From: pierre.haessig at crans.org (Pierre Haessig) Date: Thu, 24 Nov 2011 13:49:52 +0100 Subject: [SciPy-Dev] scipy docs edit rights Message-ID: <4ECE3D70.3050701@crans.org> Hi, I found a small glitch in the signal.freqz docstring the other day, so I created an account (username: pierreh) Could I get edit rights ? Best, Pierre -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 900 bytes Desc: OpenPGP digital signature URL: From krzysztof.berniak at gmail.com Thu Nov 24 11:27:13 2011 From: krzysztof.berniak at gmail.com (Krzysztof Berniak) Date: Thu, 24 Nov 2011 17:27:13 +0100 Subject: [SciPy-Dev] parameters of fitting data Message-ID: Hi, Thanks for your answer. Your idea works, but not im my example. When I did example on this page: http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.htmleverythink works done. I use sqrt(np.diag(cov)) and I get the standard errors. But when I use this in my code func = lambda z,a,b: a*np.exp(z*b) popt, pcov = optimize.curve_fit(func, z,f, maxfev = 1000) errors = sqrt(np.diag(pcov)) It displays: RuntimeError: Optimal parameters not found: Number of calls to function has reached maxfev = 1000. When I increase value of maxfev I have the same problem. regards and please help, Cristopher -------------- next part -------------- An HTML attachment was scrubbed... URL: From zunzun at zunzun.com Thu Nov 24 11:54:19 2011 From: zunzun at zunzun.com (James Phillips) Date: Thu, 24 Nov 2011 10:54:19 -0600 Subject: [SciPy-Dev] parameters of fitting data In-Reply-To: References: Message-ID: The ODR code I gave does not fit data, rather it only calculates the desired statistics for previously fitted data. So you can separately fit data and calculate parameter statistics using that code. James On Thu, Nov 24, 2011 at 10:27 AM, Krzysztof Berniak < krzysztof.berniak at gmail.com> wrote: > Hi, > > Thanks for your answer. Your idea works, but not im my example. > When I did example on this page: > > http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.htmleverythink works done. I use sqrt(np.diag(cov)) and I get the standard > errors. > But when I use this in my code > > func = lambda z,a,b: a*np.exp(z*b) > popt, pcov = optimize.curve_fit(func, z,f, maxfev = 1000) > errors = sqrt(np.diag(pcov)) > > It displays: > RuntimeError: Optimal parameters not found: Number of calls to function > has reached maxfev = 1000. > When I increase value of maxfev I have the same problem. > > regards and please help, > Cristopher > > > _______________________________________________ > SciPy-Dev mailing list > SciPy-Dev at scipy.org > http://mail.scipy.org/mailman/listinfo/scipy-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.terry at gmail.com Wed Nov 30 14:19:36 2011 From: matt.terry at gmail.com (Matt Terry) Date: Wed, 30 Nov 2011 11:19:36 -0800 Subject: [SciPy-Dev] discrete sine transforms Message-ID: Hi, I noticed that scipy.fftpack has discrete cosine transforms, but not sine transforms. It also looks like the dst's are in the fftpack source, just not the scipy wrappers. Is there a special reason for not wrapping the dst's, or do they just lack a champion? -matt From warren.weckesser at enthought.com Wed Nov 30 14:36:49 2011 From: warren.weckesser at enthought.com (Warren Weckesser) Date: Wed, 30 Nov 2011 13:36:49 -0600 Subject: [SciPy-Dev] discrete sine transforms In-Reply-To: References: Message-ID: On Wed, Nov 30, 2011 at 1:19 PM, Matt Terry wrote: > Hi, > I noticed that scipy.fftpack has discrete cosine transforms, but not > sine transforms. It also looks like the dst's are in the fftpack > source, just not the scipy wrappers. Is there a special reason for > not wrapping the dst's, or do they just lack a champion? > There's a ticket for that: http://projects.scipy.org/scipy/ticket/1432 I don't see any reason for not making dst available. I suspect it just hasn't been a top priority for anybody. A pull request would be great, if anyone wants to implement this. Warren -------------- next part -------------- An HTML attachment was scrubbed... URL: From matt.terry at gmail.com Wed Nov 30 16:13:17 2011 From: matt.terry at gmail.com (Matt Terry) Date: Wed, 30 Nov 2011 13:13:17 -0800 Subject: [SciPy-Dev] discrete sine transforms In-Reply-To: References: Message-ID: On Wed, Nov 30, 2011 at 11:36 AM, Warren Weckesser wrote: > > > On Wed, Nov 30, 2011 at 1:19 PM, Matt Terry wrote: >> >> Hi, >> I noticed that scipy.fftpack has discrete cosine transforms, but not >> sine transforms. ?It also looks like the dst's are in the fftpack >> source, just not the scipy wrappers. ?Is there a special reason for >> not wrapping the dst's, or do they just lack a champion? > > > > There's a ticket for that:? http://projects.scipy.org/scipy/ticket/1432 > > I don't see any reason for not making dst available.? I suspect it just > hasn't been a top priority for anybody.? A pull request would be great, if > anyone wants to implement this. > > Warren Sounds good. I should have something working and tested this weekend. -matt