-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #76 from BaseModelAI/introduce-typed-bindings
Add types to python bindings.
- Loading branch information
Showing
5 changed files
with
41 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
.idea | ||
cleora-light-rust.iml | ||
*.out | ||
*.so |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
from typing import Any, Iterable, Optional, Self | ||
|
||
import numpy as np | ||
from numpy.typing import NDArray | ||
|
||
|
||
class SparseMatrix: | ||
def __new__(cls, *args: Any) -> Self: | ||
pass | ||
|
||
@classmethod | ||
def from_iterator( | ||
cls, hyperedges: Iterable[str], columns: str, hyperedge_trim_n: int = 16, num_workers: Optional[int] = None | ||
) -> Self: | ||
pass | ||
|
||
@classmethod | ||
def from_files( | ||
cls, filepaths: list[str], columns: str, hyperedge_trim_n: int = 16, num_workers: Optional[int] = None | ||
) -> Self: | ||
pass | ||
|
||
def left_markov_propagate(self, x: NDArray[np.float32], num_workers: Optional[int] = None) -> NDArray[np.float32]: | ||
pass | ||
|
||
def symmetric_markov_propagate( | ||
self, x: NDArray[np.float32], num_workers: Optional[int] = None | ||
) -> NDArray[np.float32]: | ||
pass | ||
|
||
def get_entity_column_mask(self, column_name: str) -> NDArray[np.bool]: | ||
pass | ||
|
||
def entity_degrees(self) -> NDArray[np.float32]: | ||
pass | ||
|
||
def initialize_deterministically(self, feature_dim: int, seed: int = 0) -> NDArray[np.float32]: | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters