Skip to content
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

Various fixes #293

Merged
merged 5 commits into from
Jun 5, 2017
Merged

Various fixes #293

merged 5 commits into from
Jun 5, 2017

Conversation

NicVDMey
Copy link
Contributor

@NicVDMey NicVDMey commented Jun 5, 2017

Fixed poles, zeros and bug in mimotf_slice. This should resolve issues #178 and #179. Modified sv_dir_plot in utilsplot.py to plot magnitude and phase of direction vectors. Previously it just plotted the real values and discarded the imaginary parts.

Copy link
Owner

@alchemyst alchemyst left a comment

Choose a reason for hiding this comment

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

I've got some concerns over the style, but not enough to reject the pull request.

root_builder[i][1] += 1
repeated = True
break
if not repeated:
Copy link
Owner

Choose a reason for hiding this comment

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

This pattern of using a flag is why Python's for has an else. http://book.pythontips.com/en/latest/for_-_else.html#else-clause

root_builder = []
for root in roots:
repeated = False
for i in range(len(root_builder)):
Copy link
Owner

Choose a reason for hiding this comment

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

for x in range is a bit of an antipattern in Python. Especially this form range(len(. Check out https://nedbatchelder.com/text/iter.html

@alchemyst alchemyst merged commit 44c7bd2 into alchemyst:master Jun 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants