text_plain_output_1.png
import numpy as np

import numpy as np

arr_10to50 = np.arange(10, 51)

arr_10to50_even = np.arange(10, 51, 2)

np.arange(1, 10).reshape(3, 3)

np.random.rand(1)

np.random.randn(25)

np.arange(1, 101).reshape(10, 10) / 100

np.linspace(0.01, 1, 100).reshape(10, 10)

np.linspace(0, 1, 20)

arr_2_d = np.arange(1, 26).reshape(5, 5)

np.sum(arr_2_d)

np.sum(arr_2_d, axis=0)
np.sum(arr_2_d, axis=1)

np.std(arr_2_d)

arr = np.arange(1, 11)

data = np.zeros((8, 8), dtype=int)
for i in range(8):
    for j in range(8):
        if i % 2 == 0:
            if j % 2 == 0:
                data[i, j] = 1
        elif j % 2:
            data[i, j] = 1
print(data)