Answers for "complex arrays python"

0

complex arrays python

>>> import numpy as np
>>> x = 1 + 2 * 1j
>>> C = np.zeros((2,2),dtype=np.complex_)
>>> C
array([[ 0.+0.j,  0.+0.j],
       [ 0.+0.j,  0.+0.j]])
>>> C[0,0] = 1+1j + x
>>> C
array([[ 2.+3.j,  0.+0.j],
       [ 0.+0.j,  0.+0.j]])
Posted by: Guest on October-22-2021

Python Answers by Framework

Browse Popular Code Answers by Language