Oddslib basicsΒΆ
TODO
[1]:
import numpy as np
from oddslib.formats import convert_odds, OddsFormat
[2]:
american = -110
decimal = convert_odds(
american,
from_format=OddsFormat.AMERICAN,
to_format=OddsFormat.DECIMAL
)
decimal
[2]:
array([1.90909091])
[3]:
american = np.array([+120, -145])
decimal = convert_odds(
american,
from_format=OddsFormat.AMERICAN,
to_format=OddsFormat.DECIMAL,
)
print(decimal)
[2.2 1.68965517]