Skip to content

Commit 53bd24d

Browse files
committed
Use pyo3(signature=...)
1 parent 53c04a1 commit 53bd24d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/sampling.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use egobox_ego::gpmix::mixint::MixintContext;
44
use numpy::{IntoPyArray, PyArray2};
55
use pyo3::prelude::*;
66

7-
#[pyclass(rename_all = "SCREAMING_SNAKE_CASE")]
8-
#[derive(Debug, Clone, Copy)]
7+
#[pyclass(eq, eq_int, rename_all = "SCREAMING_SNAKE_CASE")]
8+
#[derive(Debug, Clone, Copy, PartialEq)]
99
pub enum Sampling {
1010
Lhs = 1,
1111
FullFactorial = 2,
@@ -28,6 +28,7 @@ pub enum Sampling {
2828
/// ndarray of shape (n_samples, n_variables)
2929
///
3030
#[pyfunction]
31+
#[pyo3(signature = (method, xspecs, n_samples, seed=None))]
3132
pub fn sampling(
3233
py: Python<'_>,
3334
method: Sampling,
@@ -89,6 +90,7 @@ pub fn sampling(
8990
/// ndarray of shape (n_samples, n_variables)
9091
///
9192
#[pyfunction]
93+
#[pyo3(signature = (xspecs, n_samples, seed=None))]
9294
pub(crate) fn lhs(
9395
py: Python,
9496
xspecs: PyObject,

0 commit comments

Comments
 (0)