
Necesito ayuda, soy principiante
Publicado por Elisa (1 intervención) el 07/12/2022 00:03:41
import numpy as np
from math import log10
vector = np.vectorize(np.int_)
presion = np.array([6300, 2000 ,355, 63, 20, 2, 2, 0.063, 0.00063, 0.00002, 0.0000063, 0.0000002])
p =vector(presion)
Intensidad=np.array([171.85, 157.99, 143.22, 131.70, 118.81, 101.12, 101.45, 68.89, 30.51, 0.20, -10.3, -40.1])
i=vector(Intensidad)
p=(presion/0.00002)
lp=20.*log10(p)
Al ejecutar este programa me sale este error: only size-1 arrays can be converted to Python scalars
No tengo ni idea de como solucionarlo, muchas gracias
from math import log10
vector = np.vectorize(np.int_)
presion = np.array([6300, 2000 ,355, 63, 20, 2, 2, 0.063, 0.00063, 0.00002, 0.0000063, 0.0000002])
p =vector(presion)
Intensidad=np.array([171.85, 157.99, 143.22, 131.70, 118.81, 101.12, 101.45, 68.89, 30.51, 0.20, -10.3, -40.1])
i=vector(Intensidad)
p=(presion/0.00002)
lp=20.*log10(p)
Al ejecutar este programa me sale este error: only size-1 arrays can be converted to Python scalars
No tengo ni idea de como solucionarlo, muchas gracias
Valora esta pregunta


0