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

Fix array dimensions #141

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brian-rose
Copy link
Member

This PR is an attempt to get the builds working again for this Cookbook. It's currently failing in the Fast Barnes notebook with

Cell In[7], line 63, in grid_rhi(file, z_res, rng_res, z_limits, rng_limits, fields)
     60     data = deepcopy(np.array(radar.fields[fields[j]]['data']))
     61     # data = data.filled(np.nan)
---> 63     res_field[:,:,j] = barnes(np.asarray([rg_loc.ravel(),radar.gate_altitude['data'].ravel()]).transpose(),
     64                        data.ravel(),
     65                        100,
     66                        np.asarray([0,0]),
     67                        100,
     68                        (len(z_pts),len(rng_pts)),
     69                        method=method,
     70                        num_iter = num_iter,
     71                        min_weight=0.0002
     72                       )
     75 data_dict = {}
     76 for k in range(len(fields)):

ValueError: could not broadcast input array from shape (1100,151) into shape (151,1100)

My guess is that just removing the .transpose() in line 63 will make the problem go away. I don't have access to the data to test locally, but we'll see if it passes here.

Copy link

github-actions bot commented Jan 9, 2025

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: d7bbaeb
✅ Deployment Preview URL: https://ProjectPythia.github.io/radar-cookbook/_preview/141

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

Successfully merging this pull request may close these issues.

1 participant