Skip to content

Commit

Permalink
Bugfix: Python interface declaration rfc_counts_v()
Browse files Browse the repository at this point in the history
  • Loading branch information
a-ma72 committed Oct 23, 2024
1 parent 4db1f48 commit fd0faed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/python/rfcnt.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ from typing import Optional, Union
from . import ArrayLike, LCMethod, ResidualMethod, SDMethod


def rfc(data: ArrayLike,
def rfc(
data: ArrayLike,
class_width: float,
*,
class_count: Optional[int] = 100,
class_width: Optional[float] = None,
class_offset: Optional[float] = None,
hysteresis: Optional[float] = None,
residual_method: Optional[Union[int, ResidualMethod]] = ResidualMethod.REPEATED,
Expand Down
4 changes: 2 additions & 2 deletions src/python/src/rfcnt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ int parse_rfc_kwargs( PyObject* kwargs, Py_ssize_t len, Rainflow *rf, Rainflow::
{
PyObject *empty = PyTuple_New(0);
int class_count = 100;
double class_width = -1; // -1 = "calculated"
double class_width = 1; // will be overwritten by required argument
double class_offset = 0;
double hysteresis = -1; // -1 = "calculated"
double hysteresis = -1; // -1 => "use class_width as hysteresis"
int enforce_margin = 1; // true
int use_hcm = 0; // false
int use_astm = 0; // false
Expand Down

0 comments on commit fd0faed

Please sign in to comment.