Not quite, because `svd` doesn't seem to know about `axis=`, so you still
need some `rollaxis` gunk to line things up.


On Wed, Jun 5, 2013 at 10:41 AM, Pauli Virtanen <notifications@github.com>wrote:

> In numpy/linalg/linalg.py:
>
> > +
> > +    Returns
> > +    -------
> > +    result : float or ndarray
> > +        If `x` is 2-D, the return values is a float.
> > +        Otherwise, it is an array with ``x.ndim - 2`` dimensions.
> > +        The return values are either the minimum or maximum of the
> > +        singular values of the matrices, depending on whether `op`
> > +        is `numpy.amin` or `numpy.amax`.
> > +
> > +    """
> > +    if row_axis > col_axis:
> > +        row_axis -= 1
> > +    y = rollaxis(rollaxis(x, col_axis, x.ndim), row_axis, -1)
> > +    if x.ndim > 3:
> > +        z = y.reshape((-1,) + y.shape[-2:])
>
> I think this function can be written as return op(np.linalg.svd(m,
> compute_uv=False)) I think
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3387/files#r4541834>
> .
>