-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathC#code.py
44 lines (40 loc) · 1.28 KB
/
C#code.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
def embed_info(data, x, y, N, flow, count):
tee = y
for _ in range(N):
if count < flow.size: # Use .size for numpy arrays
data[x, y] = complex(flow[count].real, flow[count].imag) # Use .real and .imag
y += 1
count += 1
else:
break
xss = x
for _ in range(N):
if count < flow.size: # Use .size for numpy arrays
data[x, y] = complex(flow[count].real, flow[count].imag) # Use .real and .imag
x += 1
count += 1
else:
break
tee = y
for _ in range(N):
if count < flow.size: # Use .size for numpy arrays
data[x, y] = complex(flow[count].real, flow[count].imag) # Use .real and .imag
y -= 1
count += 1
else:
break
xss = x
for _ in range(N):
if count < flow.size: # Use .size for numpy arrays
data[x, y] = complex(flow[count].real, flow[count].imag) # Use .real and .imag
x -= 1
count += 1
else:
break
Curren_X = x + 1
Curren_Y = y + 1
if count == flow.size: # Use .size for numpy arrays
return data
else:
N -= 2
return embed_info(data, Curren_X, Curren_Y, N, flow, count)