Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Address multiple deprecation warnings emerging at Python 3.12

Aperta
#72 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@sadielbartholomew ci sta già lavorando.

Dal 14/8/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
Python
Stelle
21
Fork
11
Merge medio
7h 11m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di NCAS-CMS/cf-plot

Tutte le issue di NCAS-CMS/cf-plot

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.