Skip to content

Commit

Permalink
Filter Natural Name Warning
Browse files Browse the repository at this point in the history
This hides the warning like when writing the output file:
`NaturalNameWarning: object name is not a valid Python identifier:
'lat_50.75_lon_9.25'`
  • Loading branch information
rgieseke committed Dec 12, 2024
1 parent 64d94d0 commit da484ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions attrici/detrend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import importlib.metadata
import pickle
import sys
import warnings
from dataclasses import dataclass
from datetime import date
from pathlib import Path
Expand All @@ -13,12 +14,16 @@
import xarray as xr
from func_timeout import FunctionTimedOut, func_timeout
from loguru import logger
from tables import NaturalNameWarning

import attrici
from attrici import variables
from attrici.estimation.model_pymc3 import ModelPymc3
from attrici.util import timeit

warnings.filterwarnings("ignore", category=NaturalNameWarning)


MODEL_FOR_VAR = {
"tas": variables.Tas,
"tasrange": variables.Tasrange,
Expand Down

0 comments on commit da484ba

Please sign in to comment.