Utilizando Numpy
Primeros pasos
import numpy as np
vector = np.array([1,1,2,3,5,8,13,21,34])
print(vector)
[ 1 1 2 3 5 8 13 21 34]
matrix = np.array([["papa", "mamá"], ["hermando", "hermana"]])
print(matrix)
[['papa' 'mamá']
['hermando' 'hermana']]
matriz_vectores = np.array([vector, vector, vector])
print(matriz_vectores)
[[ 1 1 2 3 5 8 13 21 34]
[ 1 1 2 3 5 8 13 21 34]
[ 1 1 2 3 5 8 13 21 34]]
type(matriz_vectores)
print(vector.dtype)
print(matriz_vectores.dtype)
print(matrix.dtype)
int64
int64
<U8
print(vector.shape)
print(matriz_vectores.shape)
(9,)
(3, 9)