Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Address multiple deprecation warnings emerging at Python 3.12

Đang mở
#72 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sadielbartholomew đang làm issue này rồi.

Từ ngày 14/8/2024.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

code hygiene

The test suite is showing that there are at last a few deprecation warnings emerging from standard cf-plot code, which therefore probably needs to be updated accordingly in its use of numpy, matplotlib and perhaps other libraries too:

...
/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/numpy/ma/core.py:5074: DeprecationWarning: Calling nonzero on 0d arrays is deprecated, as it behaves surprisingly. Use `atleast_1d(cond).nonzero()` if the old behavior was intended. If the context of this warning is of the form `arr[nonzero(cond)]`, just use `arr[cond]`.
  return narray(self.filled(0), copy=False).nonzero()
...
/home/slb93/miniconda3/envs/cf-env-312/lib/python3.12/site-packages/matplotlib/cbook.py:1699: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
  return math.isfinite(val)
...

We should make updates to prevent any DeprecationWarning emerging.

Ngôn ngữ chính
Python
Star
21
Fork
11
Merge trung bình
7 giờ 11 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của NCAS-CMS/cf-plot

Tất cả issue của NCAS-CMS/cf-plot

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.