σ
£αSc           @` sη   d  Z  d d l m Z m Z m Z d d d d d d d	 d
 d d d d g Z d d l m Z d d l j	 Z	 e	 j
 Z
 d   Z d   Z d   Z d   Z d d  Z d   Z d   Z d d  Z d   Z d d  Z d d  Z d S(   sS  Backward compatible with LinearAlgebra from Numeric

This module is a lite version of the linalg.py module in SciPy which contains
high-level Python interface to the LAPACK library.  The lite version
only accesses the following LAPACK functions: dgesv, zgesv, dgeev,
zgeev, dgesdd, zgesdd, dgelsd, zgelsd, dsyevd, zheevd, dgetrf, dpotrf.

i    (   t   divisiont   absolute_importt   print_functiont   LinAlgErrort   solve_linear_equationst   inverset   cholesky_decompositiont   eigenvaluest   Heigenvaluest   generalized_inverset   determinantt   singular_value_decompositiont   eigenvectorst   Heigenvectorst   linear_least_squares(   t	   transposeNc         C` s   t  j |  |  S(   N(   t   linalgt   solve(   t   at   b(    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR      s    c         C` s   t  j |   S(   N(   R   t   inv(   R   (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR      s    c         C` s   t  j |   S(   N(   R   t   cholesky(   R   (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   $   s    c         C` s   t  j |   S(   N(   R   t   eigvals(   R   (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   )   s    t   Lc         C` s   t  j |  |  S(   N(   R   t   eigvalsh(   R   t   UPLO(    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   ,   s    c         C` s%   t  j |   \ } } | t |  f S(   N(   R   t   eigR   (   t   At   wt   v(    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   1   s    c         C` s%   t  j |   \ } } | t |  f S(   N(   R   t   eighR   (   R   R   R   (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   5   s    g»½ΧΩί|Ϋ=c         C` s   t  j |  |  S(   N(   R   t   pinv(   R   t   rcond(    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR	   ;   s    c         C` s   t  j |   S(   N(   R   t   det(   R   (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR
   @   s    c         C` s   t  j |  | |  S(   sϋ  returns x,resids,rank,s
where x minimizes 2-norm(|b - Ax|)
      resids is the sum square residuals
      rank is the rank of A
      s is the rank of the singular values of A in descending order

If b is a matrix then x is also a matrix with corresponding columns.
If the rank of A is less than the number of columns of A or greater than
the number of rows, then residuals will be returned as an empty array
otherwise resids = sum((b-dot(A,x)**2).
Singular values less than s[0]*rcond are treated as zero.
(   R   t   lstsq(   R   R   R    (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   E   s    c         C` s   t  j |  |  S(   N(   R   t   svd(   R   t   full_matrices(    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyR   T   s    (   t   __doc__t
   __future__R    R   R   t   __all__t
   numpy.coreR   t   numpy.linalgR   R   R   R   R   R   R   R   R   R	   R
   R   R   (    (    (    sY   /opt/xtal/ccp4-6.5-linux32/lib/python2.7/site-packages/numpy/oldnumeric/linear_algebra.pyt   <module>   s*   										