Git Product home page Git Product logo

Comments (2)

Chuang1118 avatar Chuang1118 commented on May 28, 2024

Hello Author,

For more informations, I upload the matrix called fim as your code in

fim = np.nan_to_num(fim)

For building fim matrix, I am following previous Traceback messages.

Additional context

(fim< 0).sum() 
0
np.isnan(fim).sum()
0
fim.shape
(2000, 306, 306)
type(fim[0,0,0])
numpy.float64
grep MemTotal /proc/meminfo
MemTotal:       263710348 kB # 251.49378586 gigabyte

To Reproduce
1/ Download file
https://filesender.renater.fr/?s=download&token=d1c0b219-b040-4919-a59d-439dc546e1e8

2/ Rename

mv fim_bug.npy.txt  fim_bug.npy

3/Loading

with open('fim_bug.npy', 'rb') as f:
    fim = np.load(f)

4/ Running

fim_inv = np.array([
        np.linalg.pinv(fim[i, :, :])
        for i in range(fim.shape[0])
    ])

LinAlgError: SVD did not converge

---------------------------------------------------------------------------
LinAlgError                               Traceback (most recent call last)
Cell In[56], line 1
----> 1 fim_inv = np.array([
      2         np.linalg.pinv(fim[i, :, :])
      3         for i in range(fim.shape[0])
      4     ])

Cell In[56], line 2, in <listcomp>(.0)
      1 fim_inv = np.array([
----> 2         np.linalg.pinv(fim[i, :, :])
      3         for i in range(fim.shape[0])
      4     ])

File <__array_function__ internals>:180, in pinv(*args, **kwargs)

File ~/miniconda3/envs/tf-gpu-cuda10/lib/python3.8/site-packages/numpy/linalg/linalg.py:1990, in pinv(a, rcond, hermitian)
   1988     return wrap(res)
   1989 a = a.conjugate()
-> 1990 u, s, vt = svd(a, full_matrices=False, hermitian=hermitian)
   1992 # discard small singular values
   1993 cutoff = rcond[..., newaxis] * amax(s, axis=-1, keepdims=True)

File <__array_function__ internals>:180, in svd(*args, **kwargs)

File ~/miniconda3/envs/tf-gpu-cuda10/lib/python3.8/site-packages/numpy/linalg/linalg.py:1648, in svd(a, full_matrices, compute_uv, hermitian)
   1645         gufunc = _umath_linalg.svd_n_s
   1647 signature = 'D->DdD' if isComplexType(t) else 'd->ddd'
-> 1648 u, s, vh = gufunc(a, signature=signature, extobj=extobj)
   1649 u = u.astype(result_t, copy=False)
   1650 s = s.astype(_realType(result_t), copy=False)

File ~/miniconda3/envs/tf-gpu-cuda10/lib/python3.8/site-packages/numpy/linalg/linalg.py:97, in _raise_linalgerror_svd_nonconvergence(err, flag)
     96 def _raise_linalgerror_svd_nonconvergence(err, flag):
---> 97     raise LinAlgError("SVD did not converge")

LinAlgError: SVD did not converge

from ncem.

junyho486 avatar junyho486 commented on May 28, 2024

I experienced the same problem. Did you find a workaround ?

from ncem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.