Skip to content

Commit

Permalink
pyo3
Browse files Browse the repository at this point in the history
  • Loading branch information
LegrandNico committed Oct 14, 2024
1 parent 7b8e62f commit e7c37a9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 31 deletions.
56 changes: 28 additions & 28 deletions src/hgf/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/hgf/src/network.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::collections::HashMap;
use crate::updates::posterior;
use pyo3::prelude::*;
use pyo3::wrap_pyfunction;

#[derive(Debug)]
pub struct AdjacencyLists{
Expand Down Expand Up @@ -144,8 +143,8 @@ impl Network {

// Create a module to expose the class to Python
#[pymodule]
fn my_rust_library(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_class::<Network>()?; // Add the class to the Python module
fn my_module(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_class::<Network>()?;
Ok(())
}

Expand Down

0 comments on commit e7c37a9

Please sign in to comment.