Skip to content

bootstrap_analysis: scalar variables result in errors #399

@luisfabib

Description

@luisfabib

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)

Metadata

Metadata

Assignees

Labels

bugfixPatches something that isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions