@@ -17,7 +17,7 @@ use pyo3::{
1717 Bound , Py , PyAny , PyErr , Python ,
1818} ;
1919use rand:: Rng ;
20- use rand_distr:: { Distribution , StandardNormal , Uniform } ;
20+ use rand_distr:: { Distribution , Uniform } ;
2121use smallvec:: SmallVec ;
2222use thiserror:: Error ;
2323
@@ -76,7 +76,7 @@ impl PyVariable {
7676pub struct PyModel {
7777 make_logp_func : Arc < Py < PyAny > > ,
7878 make_expand_func : Arc < Py < PyAny > > ,
79- init_point_func : Arc < Option < Py < PyAny > > > ,
79+ init_point_func : Option < Arc < Py < PyAny > > > ,
8080 variables : Arc < Vec < PyVariable > > ,
8181 transform_adapter : Option < PyTransformAdapt > ,
8282 ndim : usize ,
@@ -85,7 +85,7 @@ pub struct PyModel {
8585#[ pymethods]
8686impl PyModel {
8787 #[ new]
88- #[ pyo3( signature = ( make_logp_func, make_expand_func, variables, ndim, transform_adapter=None ) ) ]
88+ #[ pyo3( signature = ( make_logp_func, make_expand_func, variables, ndim, * , init_point_func= None , transform_adapter=None ) ) ]
8989 fn new < ' py > (
9090 make_logp_func : Py < PyAny > ,
9191 make_expand_func : Py < PyAny > ,
@@ -97,7 +97,7 @@ impl PyModel {
9797 Self {
9898 make_logp_func : Arc :: new ( make_logp_func) ,
9999 make_expand_func : Arc :: new ( make_expand_func) ,
100- init_point_func : Arc :: new ( init_point_func) ,
100+ init_point_func : init_point_func. map ( |x| x . into ( ) ) ,
101101 variables : Arc :: new ( variables) ,
102102 ndim,
103103 transform_adapter : transform_adapter. map ( PyTransformAdapt :: new) ,
0 commit comments