Feature enable doctest by henklaak · Pull Request #868 · python-control/python-control

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be array instead of matrix? And why skip the doctest?

This same issue come up multiple times below.

Doctest has an existing flaw/feature, in that it doesn't do float comparisons. Down below, it's just string compare.
When system precision affects the result, small tolerances can lead to test failure.
I'll have a hard look at it again, because it annoys me no end.
(Might even have to submit a patch to the Doctest project ;-)

All the round() and other tricks to get around it are just confusing for users who look at the examples.