Commit a4d6f957 authored by Kittipong Maneewong's avatar Kittipong Maneewong

mat.py

parent 52960e4b
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