-
Notifications
You must be signed in to change notification settings - Fork 45
Implement MB02ED #214
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement MB02ED #214
Conversation
Hi @saasaa, glad to see someone working on this. Your seem to have activated some linter in your editor. Please try to avoid the format changes in unrelated functions and import statements at the head of the module files for this PR. |
I am using black as formatter by default, but I think I have removed all changes. |
I have added the docstring |
Please see #200 and consider using |
Don't worry about the current test failures of 15188ef , they look unrelated |
I have added tests for wrong input parameters and a negative definite matrix, the tests for the wrong parameters pass, but the test for the negative definite matrix gives me an |
I fixed the CI errors with setuptools_scm. Please rebase onto current master branch. |
slycot/math.py
Outdated
SlycotParameterError | ||
:info < 0: | ||
if INFO = -i, the i-th argument had an illegal value. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> with pytest.raises(expected_exception=SlycotParameterError, match="k must be >= 0") as cm:
E AssertionError: Regex pattern did not match.
E Regex: 'k must be >= 0'
E Input: '\nif INFO = -i, the i-th argument had an illegal value.'
If you want to have more meaningful error messages (not mandatory);
SlycotParameterError | |
:info < 0: | |
if INFO = -i, the i-th argument had an illegal value. | |
SlycotParameterError | |
:info = -2: | |
k must be >= 0 | |
:info = -3: | |
n must be >= 0 |
and so on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise just remove the info < 0
zero case and make sure the arg_list
is in the correct order, then raise_if_slycot_error
will generate a reasonable message. You will have to adjust the regex pattern in the tests then.
I have added docstrings for the different SlycotParameterError, I have fixed the checks in the function signature, but the tests still fail with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite good now. A few minor nitpicks:
Co-authored-by: Ben Greiner <code@bnavigator.de>
Thanks a lot for the hard work and the patience with the reviews. |
Thank you accepting my PR! |
Just a heads up @saasaa: You have worked from the |
Hi,
I have to implement the function MB02ED. Since I am no expert in Fortran, F2Py or numerics I am opening this draft PR to make sure, that I haven't overlooked something obvious or am not following the conventions of this library properly.
I have at the moment:
mb02ed
in slycot/math.pyI still have to
which I plan to do over the course of this week.
Have I overlooked something?
Thanks