.. _sma-emulator: Emulator ======== The emulator node allows for evaluating the selected response surface at user supplied samples. The model connection is supplied by the :ref:`sma-rsm` node and the points can be supplied by any node that can supply an array of shape (samples, variables). Evaluation of a single point can be performed by using a `List` node filled with the correct number of variables that matches the model. .. figure:: ./images/emulator_single_pt.png :align: center If a large amount of samples are to be evaluated, it is often easier to use the code node to generate the samples. .. figure:: ./images/emulator_code.png :align: center Where the following python code builds an array of samples to be evaluated. In this case, ``pts = np.zeros((100, 2))`` initializes an array of zeros of the shape (100 samples, 2 variables). ``pts[:, 0] = np.linspace(-2, 2, 100)`` then assigns a 100 linear increasing floats from ``-2`` to ``2`` to the first variable. .. code-block:: python import numpy as np pts = np.zeros((100, 2)) pts[:, 0] = np.linspace(-2, 2, 100) returnOut = pts