Skip to content

Commit 0d5a273

Browse files
committed
Enhance tests of the random forest module for feature developments and update CI to match glob patterns
1 parent eb0df90 commit 0d5a273

3 files changed

Lines changed: 454 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
python-version: "3.11"
1414
- name: Install dependencies
1515
run: |
16-
pip install .[dev]
17-
- name: Test
16+
pip install ".[dev]"
17+
- name: Test
1818
run: coverage run -m pytest tests
1919

2020
- name: Generate coverage report

hadamard_random_forest/random_forest.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def pascal_layer(n: int, k: int) -> int:
5454
Returns:
5555
The binomial coefficient C(n, k).
5656
"""
57-
return comb(n, k, exact=True)
57+
return comb(n, k)
5858

5959

6060
def optimized_uniform_spanning_tree(G: nx.Graph, dimension: int) -> nx.Graph:
@@ -392,5 +392,8 @@ def generate_random_forest(
392392
signs_stack = np.vstack([signs_stack, signs])
393393

394394
assert signs_stack is not None
395+
# Ensure signs_stack is 2D for majority_voting
396+
if signs_stack.ndim == 1:
397+
signs_stack = signs_stack.reshape(1, -1)
395398
return majority_voting(signs_stack)
396399

0 commit comments

Comments
 (0)