hkjc 0.3.9__tar.gz → 0.3.10__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hkjc
3
- Version: 0.3.9
3
+ Version: 0.3.10
4
4
  Summary: Library for scrapping HKJC data and perform basic analysis
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: cachetools>=6.2.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "hkjc"
3
- version = "0.3.9"
3
+ version = "0.3.10"
4
4
  description = "Library for scrapping HKJC data and perform basic analysis"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -17,7 +17,7 @@ def win_probability(p_matrix: np.ndarray, covered: List[int]) -> float:
17
17
  float: probability
18
18
  """
19
19
 
20
- win_prob = 1-np.prod(1-np.sum(p_matrix[covered, :3], axis=1))
20
+ win_prob = 1-np.prod(1-np.sum([p_matrix[c-1, :3] for c in covered], axis=1))
21
21
  return win_prob
22
22
 
23
23
 
@@ -35,7 +35,7 @@ def expected_value(pla_odds: np.ndarray, p_matrix: np.ndarray, covered: List[int
35
35
  """
36
36
  true_prob = np.sum(p_matrix[:, :3], axis=1)
37
37
  C = len(covered)
38
- ev = np.sum((true_prob*(pla_odds-rebate))[covered])/C - (1-rebate)
38
+ ev = np.sum([(true_prob*(pla_odds-rebate))[c-1] for c in covered])/C - (1-rebate)
39
39
  return ev
40
40
 
41
41
  def average_odds(pla_odds: np.ndarray, covered: List[int]) -> float:
@@ -97,7 +97,7 @@ wheels = [
97
97
 
98
98
  [[package]]
99
99
  name = "hkjc"
100
- version = "0.3.9"
100
+ version = "0.3.10"
101
101
  source = { editable = "." }
102
102
  dependencies = [
103
103
  { name = "cachetools" },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes