We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 08d3b32 commit ab415acCopy full SHA for ab415ac
.gitignore
@@ -0,0 +1 @@
1
+/venv
complex2.py
@@ -0,0 +1,20 @@
+import math
2
+import cv2
3
+import numpy as np
4
+
5
+size = 10
6
7
+res = np.linspace(-size, size, size * 2 + 1)
8
+ims = np.linspace(-size, size, size * 2 + 1) * 1j
9
10
+nums = np.zeros((len(res) - 1, len(ims) - 1), dtype=np.complex_)
11
12
+for i in range(-size, size):
13
+ for j in range(-size , size):
14
+ nums[i+size, j+size] = complex(i, j) #<-- to maintain the expected shape
15
16
+def function(complex_num):
17
+ return complex_num-2j
18
19
+print(nums[1])
20
+print(function(nums)[1])
0 commit comments