'Getting TypeError: 'float' object cannot be interpreted as an integer
Code:
x = np.linspace (0.0, 23.0, 22.0)
y1 = "time_dostavka"
y2 = "temp"
fig, df = pl.subplots()
df.pl(x, y1, label="time_dostavka")
df.pl(x, y2, label="temp")
df.set_xlabel("watch")
df.set_ylabel("temp")
df.legend()
df.pl(x=np.linspace(),y1 ="time_dostavka", y2= "temp")
pl.show()
Solution 1:[1]
This line:
x = np.linspace (0.0, 23.0, 22.0)
Must be
x = np.linspace (0.0, 23.0, 22)
22.0 is a float. It must be an int. Which is 22
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Freddy Mcloughlan |
