Skip to content

Returning np.nan breaks the 1D learner #145

Description

@tlaeven

From commit: 4381a9e onward,
returning (a np.array of) np.nan cancels the runner.
Example code, to compare the working commit, f38d20f,
with the not working one, 4381a9e.

importadaptiveadaptive.notebook_extension()
importnumpyasnpdeff(x):
if0<x<1:
returnxelse:
returnnp.nanlearner=adaptive.Learner1D(f, 0.1*np.array([-1, 1]))
runner=adaptive.Runner(learner)
runner.live_info()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions