Commit 3012cd7f authored by irada chinnachat's avatar irada chinnachat

test

parent 4c33d959
M = [
[3, 2, 1, 2],
[5, 4, 3, 3],
[7, 3, 6, 4],
]
def sub (M,m,n,x,y):
import numpy as np
inp =[[0 for a in range(m)] for s in range(n)]
mi=np.array(M)
for i in range(x,x+m):
for j in range(y,y+n):
inp[i-x][j-y]=mi[i,j]
print (inp)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment