I have this code:
R = float(input("Enter the arc's radius of curvature: "))
H = float(input("Enter the arc's height: "))
import matplotlib.pyplot as plt
import numpy as np
import math
#cc = center of curvature
cc = math.sqrt(R**2 - (H / 2)**2)
x = np.linspace(-5,5,100)
y = math.sqrt(R**2 - (x - cc)**2)
plt.plot(x, y, 'c')
plt.show()
and get this error:
TypeError: only size-1 arrays can be converted to Python scalars
How can I fix this?