@@ -6,6 +6,7 @@ use crate::np_array::{Arr, GenericFloatArray1};
66
77use const_format:: formatcp;
88use light_curve_feature:: { self as lcf, prelude:: * , DataSample } ;
9+ use macro_const:: macro_const;
910use ndarray:: IntoNdProducer ;
1011use numpy:: IntoPyArray ;
1112use pyo3:: exceptions:: PyValueError ;
@@ -52,14 +53,24 @@ __call__(t, m, sigma=None, sorted=None, check=True, fill_value=None)
5253 ndarray of np.float32 or np.float64
5354 Extracted feature array"# ;
5455
55- const METHOD_MANY_DOC : & str = r#"
56+ macro_const ! {
57+ const METHOD_MANY_DOC : & str = r#"
5658many(lcs, sorted=None, check=True, fill_value=None, n_jobs=-1)
5759 Parallel light curve feature extraction
5860
5961 It is a parallel executed equivalent of
60- >>> def many(lcs, sorted=None, fill_value=None):
61- ... return np.stack([feature(*lc, sorted=sorted, fill_value=fill_value)
62- ... for lc in lcs])
62+ >>> def many(self, lcs, sorted=None, check=True, fill_value=None):
63+ ... return np.stack(
64+ ... [
65+ ... self(
66+ ... *lc,
67+ ... sorted=sorted,
68+ ... check=check,
69+ ... fill_value=fill_value
70+ ... )
71+ ... for lc in lcs
72+ ... ]
73+ ... )
6374
6475 Parameters
6576 ----------
@@ -78,6 +89,7 @@ many(lcs, sorted=None, check=True, fill_value=None, n_jobs=-1)
7889 Number of tasks to run in paralell. Default is -1 which means run as
7990 many jobs as CPU count. See rayon rust crate documentation for
8091 details"# ;
92+ }
8193
8294const METHODS_DOC : & str = formatcp ! (
8395 r#"Methods
@@ -407,6 +419,7 @@ impl PyFeatureEvaluator {
407419 }
408420 }
409421
422+ #[ doc = METHOD_MANY_DOC ! ( ) ]
410423 #[ args( lcs, sorted = "None" , check = "true" , fill_value = "None" , n_jobs = -1 ) ]
411424 fn many (
412425 & self ,
0 commit comments