I have a larger, more complex function that essentially boils down to the below function: f(X). Why can't this function take in linspace integers as a parameter? This error is given:
"TypeError: only integer scalar arrays can be converted to a scalar index"
import numpy
from matplotlib import*
from numpy import*
import numpy as np
from math import*
import random
from random import *
import matplotlib.pyplot as plt
def f(x):
for i in range(x):
x+=1
return x
xlist = np.linspace(0, 100, 10)
ylist = f(xlist)
plt.figure(num=0)