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