[Numpy-svn] [numpy/numpy] 855b66: BUG: gh-2790, fix column scaling in polynomial pac...

GitHub noreply at github.com
Mon Feb 4 03:39:40 EST 2013


  Branch: refs/heads/master
  Home:   https://github.com/numpy/numpy
  Commit: 855b66f3eeab166ee504d73952b61b4b713f3c6f
      https://github.com/numpy/numpy/commit/855b66f3eeab166ee504d73952b61b4b713f3c6f
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-01-23 (Wed, 23 Jan 2013)

  Changed paths:
    M numpy/polynomial/chebyshev.py
    M numpy/polynomial/hermite.py
    M numpy/polynomial/hermite_e.py
    M numpy/polynomial/laguerre.py
    M numpy/polynomial/legendre.py
    M numpy/polynomial/polynomial.py

  Log Message:
  -----------
  BUG: gh-2790, fix column scaling in polynomial package least squares.

The columns should be scaled using their 2-norm, but in the complex case
that was being incorrectly computed as the square root of the sum of the
squared elements rather than as the square root of the  sum of their squared
real and imaginary parts.


  Commit: ccbbfd5fd4c0377672aff5701e3624254b3a3138
      https://github.com/numpy/numpy/commit/ccbbfd5fd4c0377672aff5701e3624254b3a3138
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-01-23 (Wed, 23 Jan 2013)

  Changed paths:
    M numpy/polynomial/tests/test_chebyshev.py
    M numpy/polynomial/tests/test_hermite.py
    M numpy/polynomial/tests/test_hermite_e.py
    M numpy/polynomial/tests/test_laguerre.py
    M numpy/polynomial/tests/test_legendre.py
    M numpy/polynomial/tests/test_polynomial.py

  Log Message:
  -----------
  TST: Add Test for column scaling in the polynomial package fits.

The test uses the complex set of sample points [1, 1j, -1, -1j] whose
squared sum is exactly zero. This would fail before the column scaling
was fixed.


  Commit: 7c1435c11d8bc0d1a3a380bc541a46f75749dc52
      https://github.com/numpy/numpy/commit/7c1435c11d8bc0d1a3a380bc541a46f75749dc52
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-01-24 (Thu, 24 Jan 2013)

  Changed paths:
    M numpy/polynomial/chebyshev.py
    M numpy/polynomial/hermite.py
    M numpy/polynomial/hermite_e.py
    M numpy/polynomial/laguerre.py
    M numpy/polynomial/legendre.py
    M numpy/polynomial/polynomial.py

  Log Message:
  -----------
  MAINT: Use a better method to detect complex arrays.

Instead of

    if lhs.dtype.char in np.typecodes['Complex']:

use

    if issubclass(lhs.dtype.type, np.complexfloating):


  Commit: 0a87823d048fca997684e86718be0d46459ad4fd
      https://github.com/numpy/numpy/commit/0a87823d048fca997684e86718be0d46459ad4fd
  Author: Charles Harris <charlesr.harris at gmail.com>
  Date:   2013-02-04 (Mon, 04 Feb 2013)

  Changed paths:
    M numpy/polynomial/chebyshev.py
    M numpy/polynomial/hermite.py
    M numpy/polynomial/hermite_e.py
    M numpy/polynomial/laguerre.py
    M numpy/polynomial/legendre.py
    M numpy/polynomial/polynomial.py
    M numpy/polynomial/tests/test_chebyshev.py
    M numpy/polynomial/tests/test_hermite.py
    M numpy/polynomial/tests/test_hermite_e.py
    M numpy/polynomial/tests/test_laguerre.py
    M numpy/polynomial/tests/test_legendre.py
    M numpy/polynomial/tests/test_polynomial.py

  Log Message:
  -----------
  Merge pull request #2947 from charris/fix-complex-polynomial-fit

Fix complex polynomial fit


Compare: https://github.com/numpy/numpy/compare/45920aafb53c...0a87823d048f


More information about the Numpy-svn mailing list