Try to search your question here, if you can't find : Ask Any Question Now ?

TypeError: descriptor 'append' requires a 'list' object but received a 'numpy.float64'

HomeCategory: stackoverflowTypeError: descriptor 'append' requires a 'list' object but received a 'numpy.float64'
Avatarbhawya asked 5 months ago

can somebody help me? I don’t understand how to fix the error in this case. I’ve already tried with numpy array, but the problem still presents.
What I’m trying to do is: to calculate the runge function with the x for n iterations. For making this, I think that I have do put every single x in a list, and I do this with the fill_cheby function. After this, I want to use the numbers in list1 as arguments of lagrange function in runge_interpolate. Here the code and the complete traceback:

 def fill_cheby(list1,n,x):
    if n==0:
        return n, x
        for i in range(0,n):

        return list1

def runge_interpolate(n):

    p=lagrange(list1, runge(x))
    print("Il polinomio รจ ", p)
    return x, p



Traceback (most recent call last):
File “”, line 33, in
File “”, line 19, in fill_cheby
TypeError: descriptor ‘append’ requires a ‘list’ object but received a ‘numpy.float64’

1 Answers
Best Answer
AvatarArben answered 5 months ago
Your Answer

9 + 19 =

Popular Tags

WP Facebook Auto Publish Powered By :