<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def load_data(directory, num):
 """Load numpy data from the data directory. The files should stored in ``../data/<dir>`` and named Returns: list: A list of loaded data, such that ``list[i]`` contains the the contents of ``i.npy``. """

    root = os.path.abspath(os.path.dirname(__file__))

    def get_path(i):  # pylint: disable=missing-docstring
        return os.path.join(root, 'data', directory, str(i) + '.npy')

    return [np.load(get_path(i)) for i in range(num)]