Add Montreal to franchise list
Fix precision bug in mround
This commit is contained in:
parent
d8e30ec5f9
commit
2ef68915d1
@ -435,6 +435,7 @@ CLUB_LIST = {
|
||||
'MIA': 'Miami Marlins',
|
||||
'MIL': 'Milwaukee Brewers',
|
||||
'MIN': 'Minnesota Twins',
|
||||
'MON': 'Montreal Expos',
|
||||
'NYM': 'New York Mets',
|
||||
'NYY': 'New York Yankees',
|
||||
'OAK': 'Oakland Athletics',
|
||||
@ -464,14 +465,15 @@ FRANCHISE_LIST = {
|
||||
'CLE': 'Cleveland Guardians',
|
||||
'COL': 'Colorado Rockies',
|
||||
'DET': 'Detroit Tigers',
|
||||
'FLA': 'Miami Marlins',
|
||||
'HOU': 'Houston Astros',
|
||||
'KCR': 'Kansas City Royals',
|
||||
'LAA': 'Los Angeles Angels',
|
||||
'LAD': 'Los Angeles Dodgers',
|
||||
'FLA': 'Miami Marlins',
|
||||
'MIA': 'Miami Marlins',
|
||||
'MIL': 'Milwaukee Brewers',
|
||||
'MIN': 'Minnesota Twins',
|
||||
'MON': 'Washington Nationals',
|
||||
'NYM': 'New York Mets',
|
||||
'NYY': 'New York Yankees',
|
||||
'OAK': 'Oakland Athletics',
|
||||
@ -570,7 +572,7 @@ def get_pitching_peripherals(season: int):
|
||||
|
||||
|
||||
def mround(x, prec=2, base=.05):
|
||||
return float(round(Decimal(str(x)) / Decimal(str(base))) * Decimal(str(base)))
|
||||
return float(round(Decimal(str(x)) / Decimal(str(base)) * Decimal(str(base)), prec))
|
||||
# return round(base * round(float(x) / base), prec)
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user