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

Index 1 is out of bounds for axis 1 with size 1. #1

Open
iamtekson opened this issue Apr 3, 2023 · 1 comment
Open

Index 1 is out of bounds for axis 1 with size 1. #1

iamtekson opened this issue Apr 3, 2023 · 1 comment

Comments

@iamtekson
Copy link

I tried to run the aggregate_boot() function but got following error,

---> 25 mi_m, mi_lb, mi_ub = aggregate_boot(mi) # shape (M,)
     26 sigma_m, sigma_lb, sigma_ub = aggregate_boot(sigma) # shape (M,)
     27 

/opt/conda/lib/python3.9/site-packages/safepython/util.py in aggregate_boot(S, alfa)
    328 
    329         S_m[j, :] = np.nanmean(S[j], axis=0) # bootstrap mean
--> 330         idx = ~np.isnan(S[j][:, 1])
    331         if np.sum(idx) < Nboot:
    332             warn('Statistics were computed using ' + '%d' % (np.sum(idx))+

IndexError: index 1 is out of bounds for axis 1 with size 1
@iamtekson
Copy link
Author

I think the possible solution might be changing the index value to 0 instead of 1. I was trying to run the function for the M shape as (1000,1)

iamtekson added a commit to iamtekson/SAFE-python that referenced this issue Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant