Changeset 3603


Ignore:
Timestamp:
Sep 15, 2018 7:20:55 PM (3 years ago)
Author:
vondreele
Message:

small mods to SVD stuff

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIImath.py

    r3577 r3603  
    9191
    9292    """
    93     u, s, vt = nl.svd(a, 0)
     93    u, s, vt = nl.svd(a)
    9494    cutoff = rcond*np.maximum.reduce(s)
    9595    s = np.where(s>cutoff,1./s,0.)
     
    183183                Ainv,Nzeros = pinv(Amatlam,xtol)    #do Moore-Penrose inversion (via SVD)
    184184            except nl.LinAlgError:
    185                 print ('ouch #1 bad SVD inversion; change parameterization')
    186185                psing = list(np.where(np.diag(nl.qr(Amatlam)[1]) < 1.e-14)[0])
     186                print ('ouch #1 bad SVD inversion; change parameterization for ',psing)
    187187                return [x0,None,{'num cyc':icycle,'fvec':M,'nfev':nfev,'lamMax':lamMax,'psing':psing,'SVD0':-1}]
    188188            Xvec = np.inner(Ainv,Yvec)      #solve
Note: See TracChangeset for help on using the changeset viewer.