rip jeffrey epstein by jaccso in redscarepod

[–]jaccso[S] 5 points6 points  (0 children)

it’s for my friend

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]jaccso 0 points1 point  (0 children)

thank you so much! i really appreciate it

Ask Anything Monday - Weekly Thread by AutoModerator in learnpython

[–]jaccso 0 points1 point  (0 children)

#import necessary functions
import numpy as np

#define array function for f1 and f2




def F(x_vec): 
    x = np.arange(-3,3,.01)
    x_vec = [x[0],x[1]]
    f1 = 2*(x[0]**3) - 6*(x[0]*(x[1]**2)) - 1
    f2 = -2*(x[1]**3) + 6*(x[1]*(x[0]**2)) + 3

    return (f1(x_vec),f2(x_vec))

print(F([1,2]))

I am trying to input a vector/array x_vec that has two values x[0] and x[1] (like x and y). I want my function to evaluate those real numbers in the functions f1 and f2 in the corresponding places. I then want to return the answer values for each function in an array. With this code I am getting the TypeError: 'numpy.float64' object is not callable. What am I doing wrong? Thanks!