Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
name[18] = "South Asia"
name[19] = "Central Asia"
name[20] = "Tibet"
name[21] = "North Asia"
# =============================================================================
from ..core.regions import Regions_cls
numbers = range(1, 22)
source = ('Giorgi and Franciso, 2000 '
'(http://onlinelibrary.wiley.com/doi/10.1029/1999GL011016)')
giorgi = Regions_cls('Giorgi', numbers, name, abbrevs, outline,
source=source)
numbers = [1, 2]
names = {1:'Unit Square1', 2: 'Unit Square2'}
abbrevs = {1:'uSq1', 2:'uSq2'}
poly = {1: Polygon(outl1), 2: Polygon(outl2)}
r = Regions_cls(name, numbers, names, abbrevs, poly)
"""
msg = (
"Using 'Regions_cls' is deprecated, please use 'Regions' instead."
" Please note that the call signature is different."
)
warnings.warn(msg, FutureWarning, stacklevel=3)
super(Regions_cls, self).__init__(
outlines=outlines,
numbers=numbers,
names=names,
abbrevs=abbrevs,
name=name,
source=source,
)
if centroids is not None:
msg = (
"Specifying 'centroids' is deprecated and the keyword will be "
"removed in the next version."
)
warnings.warn(msg, FutureWarning, stacklevel=3)
numbers = self.numbers
22 : 'E. Asia',
23 : 'S. Asia',
24 : 'S.E. Asia',
25 : 'N. Australia',
26 : 'S. Australia/New Zealand'}
# =============================================================================
from ..core.regions import Regions_cls
numbers = range(1, 27)
source = ('Seneviratne et al., 2012 '
'(https://www.ipcc.ch/pdf/special-reports/srex/'
'SREX-Ch3-Supplement_FINAL.pdf)')
srex = Regions_cls('SREX', numbers, name, short_name, outline,
source=source)