Tablero ajedrez
Publicado por Geomata (21 intervenciones) el 12/01/2021 09:44:50
Tablero de ajedrez
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import skimage.io as io
import numpy as np
import matplotlib.pyplot as plt
tablero = np.zeros((8,8))
plt.matshow(tablero,cmap='gray')
print (tablero.shape, tablero.dtype)
tablero[::2,1::2]=1
plt.matshow(tablero,cmap='gray')
tablero[1::2,::2]=1
plt.matshow(tablero,cmap='gray')
Valora esta pregunta


0