Skip to content

change the DataSaver into a function that retuns a class

Bas Nijholt requested to merge datasaver_as_function into master

Because of the problem I encountered in #65 (closed) I thought of a better way to approach the DataSaver.

This MR implements a function make_datasaver that should be called with a learner type.

For example:

DataSaver1D = adaptive.make_datasaver(adaptive.Learner1D, arg_picker=itemgetter('y'))
learner = DataSaver1D(function=f, bounds=(0, 1))

The function name should probably change and also the location of the function, but first I am curious what you think, @anton-akhmerov and @jbweston?

Edited by Bas Nijholt

Merge request reports