0

I'm trying to solve the below equation to get the value of b

from sympy import symbols, solve
import numpy as np

b = symbols('b')
expr = (30*np.log(b)/2.549*0.665*(1.5-math.exp(-0.4*(b-1))))-50
sol = solve(expr)
print(sol)

but the error shows 'loop of ufunc does not support argument 0 of type Symbol which has no callable log method' in line 4

ewokx
  • 2,204
  • 3
  • 14
  • 27
Prerna Rana
  • 11
  • 1
  • 3

1 Answers1

0
from sympy import symbols, solve , exp, log, power

b = symbols('b')
system = (30 * log(b)) / (2.549 * 0.665 * (1.5 - exp(-0.4 * (b - 1))) - 50)
sol = solve(system,b)
print(sol)
Andres Ordorica
  • 302
  • 1
  • 5