Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap_analysis: scalar variables result in errors #399

Closed
luisfabib opened this issue Nov 22, 2022 · 0 comments · Fixed by #402
Closed

bootstrap_analysis: scalar variables result in errors #399

luisfabib opened this issue Nov 22, 2022 · 0 comments · Fixed by #402
Assignees
Labels
bugfix Patches something that isn't working
Milestone

Comments

@luisfabib
Copy link
Collaborator

luisfabib commented Nov 22, 2022

As reported by a user:

The bootstrap_analysis function crashes if the function being bootstrapped returns a scalar-valued variable. For example:

def bootfcn(V):
    fit = dl.fit(Vmodel,V)
    return fit_s1.model, fit.P, fit.P_scale, fit.conc, fit.mod
bootuq = dl.bootstrap_analysis(bootfcn,Vexp,Vfit)

This is easily fixed when passing them as a list, so it should be an easy fix:

def bootfcn(V):
    fit = dl.fit(Vmodel,V)
    return fit_s1.model, fit.P, [fit.P_scale], [fit.conc], [fit.mod]
bootuq = dl.bootstrap_analysis(bootfcn,Vexp,Vfit)
@luisfabib luisfabib added the bugfix Patches something that isn't working label Nov 22, 2022
@luisfabib luisfabib added this to the v1.0 milestone Nov 22, 2022
@luisfabib luisfabib self-assigned this Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix Patches something that isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant