Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from scipy.ndimage.interpolation import zoom
- light = np.full((3, 3), 0)
- light[1, 1] = 1
- print(light)
- # [[0 0 0]
- # [0 1 0]
- # [0 0 0]]
- print(zoom(light, (2,2)))
- # [[0, 0, 0, 0, 0, 0],
- # [0, 0, 0, 0, 0, 0],
- # [0, 0, 1, 1, 0, 0],
- # [0, 0, 1, 1, 0, 0],
- # [0, 0, 0, 0, 0, 0],
- # [0, 0, 0, 0, 0, 0]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement