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 DatashaderRasterizer to allow N:1 instead of just 1:1 #98

Merged
merged 2 commits into from
May 14, 2023

Conversation

weiji14
Copy link
Owner

@weiji14 weiji14 commented May 14, 2023

Used the wrong boolean operator (should be and, not or) which meant DatashaderRasterizer didn't work when the vector_datapipe was length 1 and canvas_datapipe was length 2 or more. This prevents false errors like ValueError: Unmatched lengths for the canvas datapipe (XarrayCanvasIterDataPipe) and vector datapipe (PyogrioReaderIterDataPipe). The vector datapipe's length (1) should either be (1) to allow for broadcasting, or match the canvas datapipe's length of (2).

Patches the bugfix at #39 from zen3geo v0.3.0. Also updated a unit test to use a 2:1 canvas:vector ratio to prevent regression.

Used to wrong boolean operator (should be and, not or) which meant DatashaderRasterizer didn't work when the vector_datapipe was length 1 and canvas_datapipe was length 2 or more. This prevents false errors like `ValueError: Unmatched lengths for the canvas datapipe (XarrayCanvasIterDataPipe) and vector datapipe (PyogrioReaderIterDataPipe). The vector datapipe's length (1) should either be (1) to allow for broadcasting, or match the canvas datapipe's length of (2)`.

Patches the bugfix at #39 from zen3geo v0.3.0. Also updated a unit test to use a 2:1 canvas:vector ratio to prevent regression.
@weiji14 weiji14 added the bug Something isn't working label May 14, 2023
@weiji14 weiji14 added this to the 0.6.0 milestone May 14, 2023
@weiji14 weiji14 self-assigned this May 14, 2023
@weiji14 weiji14 marked this pull request as ready for review May 14, 2023 21:34
The latest numpy=1.24 version installed via readthedocs is incompatible with datashader=0.14.4, resulting in an error like `AttributeError: module 'numpy' has no attribute 'warnings'`. This was reported in holoviz/datashader#1209 and fixed in holoviz/datashader#1176, but will need to wait for datashader>=0.14.5 to be released.
@weiji14 weiji14 merged commit 882311a into main May 14, 2023
3 checks passed
@weiji14 weiji14 deleted the bugfix/Nto1_canvas_vector branch May 14, 2023 22:32
weiji14 added a commit that referenced this pull request May 31, 2023
Pin to numpy==1.23.* no longer needed, as datashader 0.15.0 has been released which contains patch for not using `np.warning` at holoviz/datashader#1176. Reverts a5233e4 in #98.
weiji14 added a commit that referenced this pull request May 31, 2023
* ⬆️ Bump numba from 0.56.4 to 0.57.0

Bumps [numba](https://github.com/numba/numba) from 0.56.4 to 0.57.0.
- [Release notes](https://github.com/numba/numba/releases)
- [Commits](numba/numba@0.56.4...0.57.0)

Also bumps llvmlite from 0.39.0 to 0.40.0. Includes Python 3.11 wheels!

* ⬆️ Bump spatialpandas from 0.4.4 to 0.4.8

Bumps [spatialpandas](https://github.com/holoviz/spatialpandas) from 0.4.4 to 0.4.8.
- [Release notes](https://github.com/holoviz/spatialpandas/releases)
- [Changelog](https://github.com/holoviz/spatialpandas/blob/master/CHANGELOG.md)
- [Commits](holoviz/spatialpandas@v0.4.4...v0.4.8)

Also bumped datashader from 0.14.2 to 0.14.4 and pyarrow from 9.0.0 to 12.0.0.

* 👷 NEP29: Run CI and Docs build on Python 3.11

Bumps [python](https://github.com/python/cpython) from 3.10.11 to 3.11.3.
  - [Release notes](https://github.com/python/cpython/releases/tag/v3.11.3)
  - [Changelog](https://docs.python.org/3/whatsnew/3.11.html)
  - [Commits](python/cpython@v3.10.11...v3.11.3)

Now testing the 'spatial' extras on Python 3.11.

* 🚨 Bump GitHub Actions workflows to fix deprecations

Updated actions/checkout and release-drafter/release-drafter to silence deprecated save-state (see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands), updated pypa/gh-action-pypi-publish to use kebab-case parameters, and updated actions/setup-python for good measure too. All hashes are now followed by the version string as a comment for human readability.

* ⬆️ Bump datashader from 0.14.4 to 0.15.0

Bumps [datashader](https://github.com/holoviz/datashader) from 0.14.4 to 0.15.0.
- [Release notes](https://github.com/holoviz/datashader/releases)
- [Changelog](https://github.com/holoviz/datashader/blob/master/CHANGELOG.rst)
- [Commits](holoviz/datashader@v0.14.4...v0.15.0)

* 👽 Remove numpy==1.23 pin

Pin to numpy==1.23.* no longer needed, as datashader 0.15.0 has been released which contains patch for not using `np.warning` at holoviz/datashader#1176. Reverts a5233e4 in #98.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant