Closed whzup closed 6 years ago
Just to clarify, do you want to trim the input or output or both ? I am wondering if all options should be exposed with trim_input
and trim_output
.
The use cases are (as far as I can see):
[0, -2, 1, 2]
and [0, 2, -1, 1]
-> [0, 0, 3]
[0, 0, 1, 2]
and [0, 0, -1, 1]
-> [3]
[0, -2, 1, 2]
and [0, 0, 0, 2, -1, 1]
-> [3]
[0, -2, 1, 2]
and [0, 0, 0, 2, -1, 1]
-> [0, 0, 0, 0, 0, 3]
Hmm, well the question is whether or not one or the other is necessary 🤔 Although, if you provide default True
's it might actually be no problem. Both would do it as well 👍
I played with different versions and it has a bit of effect on the rest of the library since I do a lot of stuff regarding the MIMO transfer functions. Hence it is a bit of a bigger surgery.
Do you mind keeping this PR to the docstrings?
Then it is easier to chop the rest into smaller pieces later.
@whzup Sorry it took a while to spare some time for this. Now it should be a bit better to work on. I've enabled the intersphinx
extension to link automatically to Numpy.
I've closed and opened to try to trigger Travis,
All green. Merging. Thanks @whzup !
Updated the
haroldpolyadd
function. It now trims the zeros of the output instead the zeros of the input. Improved the docstring with a parameter and return list.If you like these changes I can change the
haroldpolymult
function as well.