Closed rusandris closed 6 months ago
This also needs a test. You can use @test_throws
and test that an argument error is thrown for that combination of input types.
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
075eddf
) 89.05% compared to head (a51dc84
) 89.06%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for the PR, @rusandris!
This closes #359.
Hello, why was this added as an additional method instead of an if
clause inside an existing method?
This is rather a-typical in my experience. Shouldn't we simply have had an if-clause that checks if dimension(ssset) == m
? This way we also avoid relying on type parameters that are not public API. The type parameters of StateSpaceSet
are not public. The function dimension
is. Furthermore the method here is specialized on StateSpaceSet
rather than the more general AbstractStateSpaceSet
.
I think the if
clause also makes the code more readable as the caught clause is not in a completely separate part of the code.
I think the if clause also makes the code more readable as the caught clause is not in a completely separate part of the code.
Sure, I'll drop a PR that moves this to the existing if-sentence and uses the abstract state space set.
First of all, thanks a lot @rusandris and @kahaaga for finding the issue and solving it already. I don't want to appear unappreciative with my comment :D I should have said this before raising any concerns!!!!
And thanks @kahaaga for taking care of the quick fix to improve readability!
First of all, thanks a lot @rusandris and @kahaaga for finding the issue and solving it already. I don't want to appear unappreciative with my comment :D I should have said this before raising any concerns!!!!
No problem! More input is always good, and I agree with your assessment on the readability.
And thanks @kahaaga for taking care of the quick fix to improve readability!
I now also updated #360 to use dimension
instead of the type parameter for the state space set. Feel free to merge when/if tests pass, @Datseris.
First of all, thanks a lot @rusandris and @kahaaga for finding the issue and solving it already. I don't want to appear unappreciative with my comment :D I should have said this before raising any concerns!!!!
No worries! I think we managed to converge to a better solution. Thanks for your help, much appreciated.
Error message clarification of
codify
discussed here #358