-
Notifications
You must be signed in to change notification settings - Fork 4
Tutorial: Your first benchmarking function
Gustavo Rosa edited this page Apr 7, 2021
·
3 revisions
Every code starts with some imports, correct?
import numpy as np
from opytimark.markers.n_dimensional import SphereLet us instantiate the required class, which is Sphere's function.
# Declaring a function from the `n_dimensional` package
f = Sphere()Additionally, let's define its input value.
# Declaring an input variable for feeding the function
x = np.zeros(50)Finally, one can call the class with the input to calculate its output, as follows:
# Printing out the function's output
print(f(x))opytimark© Copyright 2021 – Licensed by Apache 2.0