How to implement multi-dimensional independent variables? #400
-
Dear all, y[:] = sin (alpha * x[0, :] * exp(beta * x[1, :]) to obtain a surrogate model? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I agree that examples of multivariate coordinates are lacking. Following the quick tutorial, how about redefining the model solver. E.g. if you want a 2D mesh, you can do something like this: coordinates = numpy.meshgrid(numpy.linspace(0, 10, 300), numpy.linspace(30, 40, 300))
def model_solver(parameters, coordinates=coordinates):
"""Simple ordinary differential equation solver."""
alpha, beta = parameters
return numpy.sin(alpha * coordinates[0, :]) * numpy.exp(beta * coordinates[1, :]) |
Beta Was this translation helpful? Give feedback.
I agree that examples of multivariate coordinates are lacking.
Following the quick tutorial, how about redefining the model solver. E.g. if you want a 2D mesh, you can do something like this: