Skip to content

Commit

Permalink
ignore typing for default statfunction
Browse files Browse the repository at this point in the history
  • Loading branch information
cgevans committed Feb 2, 2024
1 parent 33f7376 commit e13c51c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/scikits/bootstrap/bootstrap.py
Expand Up @@ -423,7 +423,7 @@ def ci(
else:
bootindices = bootstrap_indices(tdata[0], n_samples, seed=rng)
stat = np.array(
[statfunction(*(x[indices] for x in tdata)) for indices in bootindices]
[statfunction(*(x[indices] for x in tdata)) for indices in bootindices] # type: ignore
)
else:
if use_numba:
Expand All @@ -433,7 +433,7 @@ def ci(
bootindices_ind = bootstrap_indices_independent(tdata, n_samples, seed=rng)
stat = np.array(
[
statfunction(*(x[i] for x, i in zip(tdata, indices)))
statfunction(*(x[i] for x, i in zip(tdata, indices))) # type: ignore
for indices in bootindices_ind
]
)
Expand Down Expand Up @@ -485,10 +485,10 @@ def ci(
out = stat[(nvals, np.indices(nvals.shape)[1:].squeeze())]
elif output == "errorbar":
if nvals.ndim == 1:
out = np.abs(statfunction(*tdata) - stat[nvals])[np.newaxis].T
out = np.abs(statfunction(*tdata) - stat[nvals])[np.newaxis].T # type: ignore
else:
out = np.abs(
statfunction(*tdata) - stat[(nvals, np.indices(nvals.shape)[1:])]
statfunction(*tdata) - stat[(nvals, np.indices(nvals.shape)[1:])] # type: ignore
).T.squeeze()
else:
raise ValueError("Output option {0} is not supported.".format(output))
Expand Down

0 comments on commit e13c51c

Please sign in to comment.