Commit 8e92115e authored by Kittipong Maneewong's avatar Kittipong Maneewong

Update mat.py

parent 5d856783
def sub(M, m, n, x, y): def sub(M, m, n, x, y):
import numpy as np import numpy as np
M = [
[3, 2, 1, 2],
[5, 4, 3, 3],
[7, 3, 6, 4]
]
M=np.array(M) M=np.array(M)
print(M[x:x+m,y:y+n]) print(M[x:x+m,y:y+n])
M = [
[3, 2, 1, 2],
[5, 4, 3, 3],
[7, 3, 6, 4]
]
\ No newline at end of file
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