compile error for mode reduction on QuadMeshCurvilinear
- Dominant language
- Python
- Stars
- 3.6k
- Forks
- 376
- Avg merge
- 4h 32m
- Merged PRs (30d)
- 1
Description
#### ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)
Software Version Info
```plaintext
Datashader 0.18.1
```
#### Description of expected behavior and the observed behavior
The mode reduction works with QuadMeshRectilinear but fails for QuadMeshCurvilinear
#### Complete, minimal, self-contained example code that reproduces the issue
```python
import numpy as np
import xarray as xr
import datashader as dsh
import datashader.transfer_functions as tf
ds = xr.Dataset(
{"foo": (("x", "y"), np.arange(120).reshape(30, 4))},
coords={"x": np.arange(30), "y": np.arange(4)},
).drop_indexes(("x", "y"))
# -----------> commenting out the bottom line fixes it
ds["x"], ds["y"] = xr.broadcast(ds.x, ds.y)
cvs = dsh.Canvas(x_range=(0, 3), y_range=(0, 4))
mesh = cvs.quadmesh(ds, x="x", y="y", agg=dsh.reductions.mode("foo"))
tf.shade(mesh)
```
#### Stack traceback and/or browser JavaScript console output
```
TypingError: Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Failed in nopython mode pipeline (step: nopython frontend)
Untyped global name '_2': Cannot determine Numba type of
File "", line 2:
During: Pass nopython_type_inference
During: resolving callee type: type(CPUDispatcher())
During: typing of call at (55)
During: resolving callee type: type(CPUDispatcher())
During: typing of call at (118)
During: resolving callee type: type(CPUDispatcher())
During: typing of call at (55)
File "", line 55:
During: Pass nopython_type_inference
During: resolving callee type: type(CPUDispatcher())
During: typing of call at (26)
During: resolving callee type: type(CPUDispatcher())
During: typing of call at (26)
File "", line 26:
During: Pass nopython_type_inference
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the minimal Python example from the issue, especially the xr.broadcast call and the QuadMeshCurvilinear mode reduction path. Compare it with the working QuadMeshRectilinear case and the reported Numba traceback; done means the example completes and tf.shade(mesh) works without a compile error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- numpy, python
- Domain
- data-visualization
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100