cp.where() failed on complex matrices
See original GitHub issueI tried to use cp.where() on complex matrices, which seems not supported yet. Here is a snippet of the code
import cupy as cp
a = cp.random.rand(2,2).astype(cp.complex64)
b = cp.random.rand(2,2).astype(cp.complex64)
c = cp.array([[0,0],[1,1]])
d = cp.where(c,a,b)
the error message looks like
File "<stdin>", line 1, in <module>
File "/home/liangs/anaconda3/envs/tensorflow/lib/python3.5/site-packages/cupy/sorting/search.py", line 136, in where
return _where_ufunc(condition.astype('?'), x, y)
File "cupy/core/_kernel.pyx", line 833, in cupy.core._kernel.ufunc.__call__
File "cupy/core/_kernel.pyx", line 704, in cupy.core._kernel._guess_routine
TypeError: Wrong type ((<class 'numpy.bool_'>, <class 'numpy.complex64'>, <class 'numpy.complex64'>)) of arguments for cupy_where
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Advanced Features — CVXPY 1.2 documentation
A complex valued variable. x = cp.Variable(complex=True) # A purely imaginary parameter. p = cp.Parameter(imag=True) print("p.is_imag() = ", p.is_imag()) ...
Read more >Complex number computational error grows as the size of ...
If I have two small complex matrices, the complex number multiplication is fine even when I do it manually (Breaking the complex numbers ......
Read more >Linear Algebra - Julia Documentation
A linear solve involving such a matrix cannot be computed. The info field indicates the location of (one of) the singular value(s). Exception...
Read more >Linear Algebra through Matrices
and scalar multiplication of matrices, Mm,n(C) is a complex vector space. ... For, if cp+1 = 0 then, Equation (3.3.4) has a non-trivial...
Read more >Linear Algebra Problems 1 Basics - Penn Math
Let A be an n×n matrix of real or complex numbers. ... so P2 = P . If c = 1, find a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Done
Merged #2175.