Problemas de matriz Python
Isso continua a partir deste tópico: Matriz Python, alguma solução?
Entrad
from numpy import *
import numpy
x=[['1','7'],
['1.5', '8'],
['2', '5.5'],
['2','9']]
Códig
y = x[:, :, None] * x[:, None]
print y.sum(axis=0)
Eu recebi um erro:
"os índices da lista devem ser números inteiros, não tuplas"
Mas se x forx = numpy.array([[1, 7], [1.5, 8], [2, 5.5], [2, 9]])
então está tudo bem, mas eu não tenhosuch input.