From cedd8c9de8b4cf22ce78f32242f00c4d597458ab Mon Sep 17 00:00:00 2001 From: a-ma72 Date: Sat, 27 Aug 2022 15:57:04 +0200 Subject: [PATCH] v0.4.2 Fix: rfc throws an exception, if parameter `wl` is set to None. --- python/pyproject.toml | 2 +- python/requirements.txt | 2 +- python/setup.py | 4 ++-- python/src/rfcnt.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/pyproject.toml b/python/pyproject.toml index 8370ec9..b024c2a 100644 --- a/python/pyproject.toml +++ b/python/pyproject.toml @@ -2,6 +2,6 @@ requires = [ "setuptools>=42", "wheel", - "numpy" + "numpy~=1.19.5" ] build-backend = "setuptools.build_meta" \ No newline at end of file diff --git a/python/requirements.txt b/python/requirements.txt index 1acec7d..70105b3 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,4 +1,4 @@ matplotlib>=3.2.2 -numpy>=1.19.5 +numpy~=1.19.5 pandas>=1.1.5 seaborn>=0.11.1 diff --git a/python/setup.py b/python/setup.py index e788608..824a636 100644 --- a/python/setup.py +++ b/python/setup.py @@ -1,7 +1,7 @@ from setuptools import setup, Extension from os import path -version = (0, 4, 1) +version = (0, 4,2) try: from numpy import get_include as get_numpy_include @@ -25,7 +25,7 @@ def main(): keywords='rainflow counting', author="Andreas Martin", license='BSD-2-Clause License', - url='http://github.com/AndreasMartin72/rainflow', + url='http://github.com/a-ma72/rainflow', setup_requires=['wheel'], install_requires=['numpy'], packages=["rfcnt", "rfcnt.tests"], diff --git a/python/src/rfcnt.cpp b/python/src/rfcnt.cpp index 5503f3a..766c27a 100644 --- a/python/src/rfcnt.cpp +++ b/python/src/rfcnt.cpp @@ -77,7 +77,7 @@ int parse_rfc_kwargs( PyObject* kwargs, Py_ssize_t len, Rainflow *rf, Rainflow:: Py_DECREF( empty ); // Parameters of the SN curve, if defined - if( wl ) + if( wl && wl != Py_None ) { if( !PyDict_Check( wl ) ) {