Skip to content

Commit fd0faed

Browse files
committed
Bugfix: Python interface declaration rfc_counts_v()
1 parent 4db1f48 commit fd0faed

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/python/rfcnt.pyi

+4-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,11 @@ from typing import Optional, Union
33
from . import ArrayLike, LCMethod, ResidualMethod, SDMethod
44

55

6-
def rfc(data: ArrayLike,
6+
def rfc(
7+
data: ArrayLike,
8+
class_width: float,
9+
*,
710
class_count: Optional[int] = 100,
8-
class_width: Optional[float] = None,
911
class_offset: Optional[float] = None,
1012
hysteresis: Optional[float] = None,
1113
residual_method: Optional[Union[int, ResidualMethod]] = ResidualMethod.REPEATED,

src/python/src/rfcnt.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ int parse_rfc_kwargs( PyObject* kwargs, Py_ssize_t len, Rainflow *rf, Rainflow::
205205
{
206206
PyObject *empty = PyTuple_New(0);
207207
int class_count = 100;
208-
double class_width = -1; // -1 = "calculated"
208+
double class_width = 1; // will be overwritten by required argument
209209
double class_offset = 0;
210-
double hysteresis = -1; // -1 = "calculated"
210+
double hysteresis = -1; // -1 => "use class_width as hysteresis"
211211
int enforce_margin = 1; // true
212212
int use_hcm = 0; // false
213213
int use_astm = 0; // false

0 commit comments

Comments
 (0)