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

Do not use warnings from numpy #1176

Merged
merged 1 commit into from
Feb 8, 2023
Merged

Conversation

danigm
Copy link
Contributor

@danigm danigm commented Feb 7, 2023

numpy has removed the warnings symbol from the init.py file so np.warnings is not valid in newer versions of numpy. This patch justs imports the warnings module and use it directly.

numpy has removed the warnings symbol from the __init__.py file so
np.warnings is not valid in newer versions of numpy. This patch justs
imports the warnings module and use it directly.
@codecov
Copy link

codecov bot commented Feb 7, 2023

Codecov Report

Merging #1176 (141210c) into main (21a8614) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1176      +/-   ##
==========================================
+ Coverage   85.36%   85.38%   +0.01%     
==========================================
  Files          35       35              
  Lines        8010     8011       +1     
==========================================
+ Hits         6838     6840       +2     
+ Misses       1172     1171       -1     
Impacted Files Coverage Δ
datashader/core.py 88.25% <100.00%> (+0.20%) ⬆️
datashader/transfer_functions/__init__.py 86.89% <100.00%> (+0.02%) ⬆️

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

@ianthomas23 ianthomas23 added this to the v0.14.5 milestone Feb 8, 2023
Copy link
Member

@ianthomas23 ianthomas23 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @danigm

@ianthomas23 ianthomas23 merged commit d8167b4 into holoviz:main Feb 8, 2023
weiji14 added a commit to weiji14/zen3geo that referenced this pull request May 14, 2023
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 added a commit to weiji14/zen3geo that referenced this pull request May 14, 2023
* 🐛 Fix DatashaderRasterizer to allow N:1 instead of just 1:1

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.

* 📌 Temporarily pin numpy<1.24 to prevent AttributeError

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 added a commit to weiji14/zen3geo 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 to weiji14/zen3geo 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.
jthetzel added a commit to c-core-labs/xarray-spatial that referenced this pull request Jul 6, 2023
Datashader 0.15.0 removes error numpy.warnings removal:
holoviz/datashader#1176
thuydotm pushed a commit to makepath/xarray-spatial that referenced this pull request Jul 10, 2023
* chore: Remove numpy pin and pin datashader

Datashader 0.15.0 removes error numpy.warnings removal:
holoviz/datashader#1176

* chore: Require Python >= 3.8
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.

None yet

2 participants