BucketResampler doesn't accept numpy arrays.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 385
- Forks
- 102
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 9
Description
lon_swath, lat_swath = swath_def.get_lonlats()
resampler = BucketResampler(target_area, lon_swath, lat_swath)
Gives following error.
121 result = da.map_blocks(self._get_proj_coordinates, lons, lats,
--> 122 new_axis=0, chunks=(2,) + lons.chunks)
123 proj_x = result[0, :]
124 proj_y = result[1, :]
AttributeError: 'numpy.ndarray' object has no attribute 'chunks'
...
Problem was solved by changing the arrays to Dask arrays.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at BucketResampler and trace the da.map_blocks call shown in the traceback, especially its use of lons.chunks and lats.chunks. Check how numpy arrays are handled before this point, then add a regression test using the issue's numpy-array example. Done means BucketResampler accepts numpy longitude and latitude arrays without requiring callers to convert them to Dask arrays.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100