generate functionThu, 03 Aug 2023

Trabajemos con NumPy Importa numpy y usa un alias para poder utilizar sus recursos Crea un array de elementos (del 10 al 100) Invertir el array Crear un array 3x3 con valores de 0 a 8 Crear un array identidad de 6x6 Crear un array con valores al azar con forma 3x3x3 Crear dos arrays con valores al azar A y B, verificar si son iguales (hay varias opciones, investigar)

import numpy as np s = np.arange(10, 101) s = s[::-1] s = np.arange(9).reshape(3,3) s = np.eye(6) s = np.random.rand(3,3,3) a = np.random.rand(3,3) b = np.random.rand(3,3) np.array_equal(a,b)

Questions about programming?Chat with your personal AI assistant