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

Separate out 3d and 4d combine functions #1243

Merged
merged 1 commit into from
Jul 4, 2023
Merged

Separate out 3d and 4d combine functions #1243

merged 1 commit into from
Jul 4, 2023

Conversation

ianthomas23
Copy link
Member

For *_n reductions such as max_n we need 3d and 4d versions of combine functions to support non-categorical aggregations with shape (ny, nx, n) and categorical aggregations with shape (ny, nx, ncat, n). In the main branch we currently only implement the 4d versions and when we are dealing with non-categorical 3d arrays we insert an extra dimension so that they can be considered to have a single category. This has been fine up until now.

Looking forward I am implementing antialiased line support for inspection reductions such as max_n and where and these combine functions are needed in the antialiased line code. This requires the array dimension changing to occur within numba-jitted functions which isn't really viable as numpy arrays with different dimensions are considered different types in numba. So here the solution is to have separate 3d and 4d numba-jitted functions which iterate over the arrays and call common functions to do the low-level maths.

@ianthomas23 ianthomas23 added this to the v0.15.1 milestone Jun 30, 2023
@codecov
Copy link

codecov bot commented Jun 30, 2023

Codecov Report

Merging #1243 (049e036) into main (6e9b412) will increase coverage by 0.06%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1243      +/-   ##
==========================================
+ Coverage   83.36%   83.42%   +0.06%     
==========================================
  Files          35       35              
  Lines        8826     8858      +32     
==========================================
+ Hits         7358     7390      +32     
  Misses       1468     1468              
Impacted Files Coverage Δ
datashader/reductions.py 77.87% <100.00%> (ø)
datashader/utils.py 83.80% <100.00%> (+1.31%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ianthomas23 ianthomas23 merged commit d534e2d into holoviz:main Jul 4, 2023
16 checks passed
@ianthomas23 ianthomas23 deleted the separate_34d_combines branch July 4, 2023 09:04
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