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

Removed unused/unneeded "from matplotlib import pyplot" #7

Merged
merged 4 commits into from Jan 19, 2016

Conversation

wmwv
Copy link
Contributor

@wmwv wmwv commented Apr 22, 2015

Passes buildbot
http://lsst-buildx.ncsa.illinois.edu:8010/builders/DM_stack/builds/5664

This is just a trivial removal of two unused "from matplotlib import pyplot" lines.

No need for consideration of the discussion at
https://jira.lsstcorp.org/browse/DM-2588

@@ -25,7 +25,6 @@
import collections
import numpy
import copy
from matplotlib import pyplot
import matplotlib.colors
import mpl_toolkits.mplot3d
Copy link
Member

Choose a reason for hiding this comment

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

I think this one is unused as well... pylint lists 5 useless imports.

Copy link
Member

Choose a reason for hiding this comment

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

The mpl_toolkits.mplot3d import actually needs to be moved to optimizerDisplay.py, where the projection='3d' argument to add_subplot requires that module to have been imported (I can see how that would confuse a linter). Looks like I forgot to move the import when I refactored this code at some point.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it looks like import matplotlib.colors should go in optimizerDisplay.py as well.

@timj
Copy link
Member

timj commented Sep 15, 2015

@TallJimbo I've moved the other imports as discussed in the PR.

@wmwv Looking at python/lsst/meas/modelfit/display/interactive.py I worry that the import matplotlib is needed because I see that plotDistribution assumes matplotlib is available.

@wmwv
Copy link
Contributor Author

wmwv commented Sep 17, 2015

@timj Then perhaps the import could just be done within plotDistribution.

@timj
Copy link
Member

timj commented Sep 17, 2015

I've put in the deferred loading. I'm fine with that although I seem to recall there wasn't consensus on whether this was a good thing or not. I think the patches are close enough that @TallJimbo can have a final review.

@wmwv
Copy link
Contributor Author

wmwv commented Dec 18, 2015

Did this functionality ever get merged?
@timj @TallJimbo

@wmwv wmwv merged commit 9d318d3 into master Jan 19, 2016
@ktlim ktlim deleted the tickets/DM-2588 branch August 25, 2018 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants