1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373
|
==========================
SciPy 0.13.0 Release Notes
==========================
.. contents::
SciPy 0.13.0 is the culmination of 7 months of hard work. It contains
many new features, numerous bug-fixes, improved test coverage and
better documentation. There have been a number of deprecations and
API 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.13.x branch, and on adding
new features on the master branch.
This release requires Python 2.6, 2.7 or 3.1-3.3 and NumPy 1.5.1 or greater.
Highlights of this release are:
- support for fancy indexing and boolean comparisons with sparse matrices
- interpolative decompositions and matrix functions in the linalg module
- two new trust-region solvers for unconstrained minimization
New features
============
``scipy.integrate`` improvements
--------------------------------
N-dimensional numerical integration
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
A new function `scipy.integrate.nquad`, which provides N-dimensional
integration functionality with a more flexible interface than ``dblquad`` and
``tplquad``, has been added.
``dopri*`` improvements
^^^^^^^^^^^^^^^^^^^^^^^
The intermediate results from the ``dopri`` family of ODE solvers can now be
accessed by a *solout* callback function.
``scipy.linalg`` improvements
-----------------------------
Interpolative decompositions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Scipy now includes a new module `scipy.linalg.interpolative`
containing routines for computing interpolative matrix decompositions
(ID). This feature is based on the ID software package by
P.G. Martinsson, V. Rokhlin, Y. Shkolnisky, and M. Tygert, previously
adapted for Python in the PymatrixId package by K.L. Ho.
Polar decomposition
^^^^^^^^^^^^^^^^^^^
A new function `scipy.linalg.polar`, to compute the polar decomposition
of a matrix, was added.
BLAS level 3 functions
^^^^^^^^^^^^^^^^^^^^^^
The BLAS functions ``symm``, ``syrk``, ``syr2k``, ``hemm``, ``herk`` and
``her2k`` are now wrapped in `scipy.linalg`.
Matrix functions
^^^^^^^^^^^^^^^^
Several matrix function algorithms have been implemented or updated following
detailed descriptions in recent papers of Nick Higham and his co-authors.
These include the matrix square root (``sqrtm``), the matrix logarithm
(``logm``), the matrix exponential (``expm``) and its Frechet derivative
(``expm_frechet``), and fractional matrix powers (``fractional_matrix_power``).
``scipy.optimize`` improvements
-------------------------------
Trust-region unconstrained minimization algorithms
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The ``minimize`` function gained two trust-region solvers for unconstrained
minimization: ``dogleg`` and ``trust-ncg``.
``scipy.sparse`` improvements
-----------------------------
Boolean comparisons and sparse matrices
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
All sparse matrix types now support boolean data, and boolean operations. Two
sparse matrices `A` and `B` can be compared in all the expected ways `A < B`,
`A >= B`, `A != B`, producing similar results as dense Numpy arrays.
Comparisons with dense matrices and scalars are also supported.
CSR and CSC fancy indexing
^^^^^^^^^^^^^^^^^^^^^^^^^^
Compressed sparse row and column sparse matrix types now support fancy indexing
with boolean matrices, slices, and lists. So where A is a (CSC or CSR) sparse
matrix, you can do things like::
>>> A[A > 0.5] = 1 # since Boolean sparse matrices work
>>> A[:2, :3] = 2
>>> A[[1,2], 2] = 3
``scipy.sparse.linalg`` improvements
------------------------------------
The new function ``onenormest`` provides a lower bound of the 1-norm of a
linear operator and has been implemented according to Higham and Tisseur
(2000). This function is not only useful for sparse matrices, but can also be
used to estimate the norm of products or powers of dense matrices without
explicitly building the intermediate matrix.
The multiplicative action of the matrix exponential of a linear operator
(``expm_multiply``) has been implemented following the description in Al-Mohy
and Higham (2011).
Abstract linear operators (`scipy.sparse.linalg.LinearOperator`) can now be
multiplied, added to each other, and exponentiated, producing new linear
operators. This enables easier construction of composite linear operations.
``scipy.spatial`` improvements
------------------------------
The vertices of a `ConvexHull` can now be accessed via the `vertices` attribute,
which gives proper orientation in 2-D.
``scipy.signal`` improvements
-----------------------------
The cosine window function `scipy.signal.cosine` was added.
``scipy.special`` improvements
------------------------------
New functions `scipy.special.xlogy` and `scipy.special.xlog1py` were added.
These functions can simplify and speed up code that has to calculate
``x * log(y)`` and give 0 when ``x == 0``.
``scipy.io`` improvements
-------------------------
Unformatted Fortran file reader
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The new class `scipy.io.FortranFile` facilitates reading unformatted
sequential files written by Fortran code.
``scipy.io.wavfile`` enhancements
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`scipy.io.wavfile.write` now accepts a file buffer. Previously it only
accepted a filename.
`scipy.io.wavfile.read` and `scipy.io.wavfile.write` can now handle floating
point WAV files.
``scipy.interpolate`` improvements
----------------------------------
B-spline derivatives and antiderivatives
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
`scipy.interpolate.splder` and `scipy.interpolate.splantider` functions
for computing B-splines that represent derivatives and antiderivatives
of B-splines were added. These functions are also available in the
class-based FITPACK interface as ``UnivariateSpline.derivative`` and
``UnivariateSpline.antiderivative``.
``scipy.stats`` improvements
----------------------------
Distributions now allow using keyword parameters in addition to
positional parameters in all methods.
The function `scipy.stats.power_divergence` has been added for the
Cressie-Read power divergence statistic and goodness of fit test.
Included in this family of statistics is the "G-test"
(http://en.wikipedia.org/wiki/G-test).
`scipy.stats.mood` now accepts multidimensional input.
An option was added to `scipy.stats.wilcoxon` for continuity correction.
`scipy.stats.chisquare` now has an `axis` argument.
`scipy.stats.mstats.chisquare` now has `axis` and `ddof` arguments.
Deprecated features
===================
``expm2`` and ``expm3``
-----------------------
The matrix exponential functions `scipy.linalg.expm2` and `scipy.linalg.expm3`
are deprecated. All users should use the numerically more robust
`scipy.linalg.expm` function instead.
``scipy.stats`` functions
-------------------------
`scipy.stats.oneway` is deprecated; `scipy.stats.f_oneway` should be used
instead.
`scipy.stats.glm` is deprecated. `scipy.stats.ttest_ind` is an equivalent
function; more full-featured general (and generalized) linear model
implementations can be found in statsmodels.
`scipy.stats.cmedian` is deprecated; ``numpy.median`` should be used instead.
Backwards incompatible changes
==============================
LIL matrix assignment
---------------------
Assigning values to LIL matrices with two index arrays now works similarly as
assigning into ndarrays::
>>> x = lil_matrix((3, 3))
>>> x[[0,1,2],[0,1,2]]=[0,1,2]
>>> x.todense()
matrix([[ 0., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 2.]])
rather than giving the result::
>>> x.todense()
matrix([[ 0., 1., 2.],
[ 0., 1., 2.],
[ 0., 1., 2.]])
Users relying on the previous behavior will need to revisit their code.
The previous behavior is obtained by ``x[numpy.ix_([0,1,2],[0,1,2])] = ...``.
Deprecated ``radon`` function removed
-------------------------------------
The ``misc.radon`` function, which was deprecated in scipy 0.11.0, has been
removed. Users can find a more full-featured ``radon`` function in
scikit-image.
Removed deprecated keywords ``xa`` and ``xb`` from ``stats.distributions``
--------------------------------------------------------------------------
The keywords ``xa`` and ``xb``, which were deprecated since 0.11.0, have
been removed from the distributions in ``scipy.stats``.
Changes to MATLAB file readers / writers
----------------------------------------
The major change is that 1D arrays in numpy now become row vectors (shape 1, N)
when saved to a MATLAB 5 format file. Previously 1D arrays saved as column
vectors (N, 1). This is to harmonize the behavior of writing MATLAB 4 and 5
formats, and adapt to the defaults of numpy and MATLAB - for example
``np.atleast_2d`` returns 1D arrays as row vectors.
Trying to save arrays of greater than 2 dimensions in MATLAB 4 format now raises
an error instead of silently reshaping the array as 2D.
``scipy.io.loadmat('afile')`` used to look for `afile` on the Python system path
(``sys.path``); now ``loadmat`` only looks in the current directory for a
relative path filename.
Other changes
=============
Security fix: ``scipy.weave`` previously used temporary directories in an
insecure manner under certain circumstances.
Cython is now required to build *unreleased* versions of scipy.
The C files generated from Cython sources are not included in the git repo
anymore. They are however still shipped in source releases.
The code base received a fairly large PEP8 cleanup. A ``tox pep8``
command has been added; new code should pass this test command.
Scipy cannot be compiled with gfortran 4.1 anymore (at least on RH5), likely
due to that compiler version not supporting entry constructs well.
Authors
=======
This release contains work by the following people (contributed at least
one patch to this release, names in alphabetical order):
* Jorge Cañardo Alastuey +
* Tom Aldcroft +
* Max Bolingbroke +
* Joseph Jon Booker +
* François Boulogne
* Matthew Brett
* Christian Brodbeck +
* Per Brodtkorb +
* Christian Brueffer +
* Lars Buitinck
* Evgeni Burovski +
* Tim Cera
* Lawrence Chan +
* David Cournapeau
* Dražen Lučanin +
* Alexander J. Dunlap +
* endolith
* André Gaul +
* Christoph Gohlke
* Ralf Gommers
* Alex Griffing +
* Blake Griffith +
* Charles Harris
* Bob Helmbold +
* Andreas Hilboll
* Kat Huang +
* Oleksandr (Sasha) Huziy +
* Gert-Ludwig Ingold +
* Thouis (Ray) Jones
* Juan Luis Cano Rodríguez +
* Robert Kern
* Andreas Kloeckner +
* Sytse Knypstra +
* Gustav Larsson +
* Denis Laxalde
* Christopher Lee
* Tim Leslie
* Wendy Liu +
* Clemens Novak +
* Takuya Oshima +
* Josef Perktold
* Illia Polosukhin +
* Przemek Porebski +
* Steve Richardson +
* Branden Rolston +
* Skipper Seabold
* Fazlul Shahriar
* Leo Singer +
* Rohit Sivaprasad +
* Daniel B. Smith +
* Julian Taylor
* Louis Thibault +
* Tomas Tomecek +
* John Travers
* Richard Tsai +
* Jacob Vanderplas
* Patrick Varilly
* Pauli Virtanen
* Stefan van der Walt
* Warren Weckesser
* Pedro Werneck +
* Nils Werner +
* Michael Wimmer +
* Nathan Woods +
* Tony S. Yu +
A total of 65 people contributed to this release.
People with a "+" by their names contributed a patch for the first time.
|