OptimalPoly icon indicating copy to clipboard operation
OptimalPoly copied to clipboard

ZeroDivisionError for mp.sign funtion

Open devharsh opened this issue 3 years ago • 0 comments

[/usr/local/lib/python3.7/dist-packages/mpmath/matrices/linalg.py](https://localhost:8080/#) in lu_solve(ctx, A, b, **kwargs)
    224             else:
    225                 # LU factorization
--> 226                 A, p = ctx.LU_decomp(A)
    227                 b = ctx.L_solve(A, b, p)
    228                 x = ctx.U_solve(A, b)

[/usr/local/lib/python3.7/dist-packages/mpmath/matrices/linalg.py](https://localhost:8080/#) in LU_decomp(ctx, A, overwrite, use_cache)
    142             ctx.swap_row(A, j, p[j])
    143             if ctx.absmin(A[j,j]) <= tol:
--> 144                 raise ZeroDivisionError('matrix is numerically singular')
    145             # calculate elimination factors and add rows
    146             for i in xrange(j + 1, n):

ZeroDivisionError: matrix is numerically singular

devharsh avatar Aug 08 '22 23:08 devharsh