question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Complex number support for pinv

See original GitHub issue

Currently, cupy.linalg.pinv does not seem to work with complex numbers. This code

u, s, vt = decomposition.svd(a, full_matrices=False)
cutoff = rcond * s.max()     # error
s1 = 1 / s
s1[s <= cutoff] = 0    # error
return core.dot(vt.T, s1[:, None] * u.T)

does not work since max() is not supported on complex arrays (see #794) and the same holds for comparison operators.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
leofangcommented, Feb 19, 2021

@kmaehashi This can be closed.

1reaction
themightyoarfishcommented, Sep 7, 2018

See https://github.com/cupy/cupy/compare/master...themightyoarfish:complex-comparison for a tentative attempt at implementing these operations.

Read more comments on GitHub >

github_iconTop Results From Across the Web

MATLAB pinv - Moore-Penrose pseudoinverse - MathWorks
This MATLAB function returns the Moore-Penrose Pseudoinverse of matrix A. ... matrix. Input matrix. Data Types: single | double. Complex Number Support: Yes...
Read more >
MAGMA: complex number support
MAGMA: complex number support. In C++, including magma_operators. h defines the usual unary and binary operators for complex numbers: +, +=, -, -=,...
Read more >
Ask Question - Math Stack Exchange
1 Answer 1 ... which is encapsulated by the MATLAB function pinv . ... The pseudoinverse will always work, and will be the...
Read more >
Complex Numbers and Basic Functionality - R
Complex vectors can be created with complex . The vector can be specified either by giving its length, its real and imaginary parts,...
Read more >
numpy.linalg.pinv — NumPy v1.24 Manual
Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all large singular values.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found