-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MAINT: Change spectral to nipy_spectral, update docs, leave aliases #1127
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
Conversation
Check my docstring formatting. I used
and
for instance. not sure if that's right for functions |
I think you need double backquotes for the set_cmap call example, but that is completely from memory. |
@@ -342,7 +343,7 @@ def gfunc32(x): | |||
'green': ((0., 0., 0.),(1.0, 1.0, 1.0)), | |||
'blue': ((0., 1., 1.),(1.0, 0.5, 0.5))} | |||
|
|||
_spectral_data = {'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667), | |||
_nipy_spectral_data = {'red': [(0.0, 0.0, 0.0), (0.05, 0.4667, 0.4667), | |||
(0.10, 0.5333, 0.5333), (0.15, 0.0, 0.0), | |||
(0.20, 0.0, 0.0), (0.25, 0.0, 0.0), | |||
(0.30, 0.0, 0.0), (0.35, 0.0, 0.0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's only aesthetic, but it wouldn't hurt to have all the data line up nicely.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I was thinking of refactoring the datad assignments into a single dictionary too. These sorts of OCD formatting are welcome? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personally, if it makes the code more readable then that's preferred. Ideally, @WeatherGod will weigh in with his PEP8 ninja chops :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well PEP8 says not to align code for readability, but I think common usage disagrees. http://www.python.org/dev/peps/pep-0008/#pet-peeves
anything else that needs to be done here? |
@NelleV - your feedback on this would be highly valuable if you have a moment? |
LGTM 👍 |
Change spectral to nipy_spectral, update docs, leave aliases
For #879, rename
spectral
tonipy_spectral
(to distinguish fromSpectral
). Leavespectral
as an alias, andspectral()
as a shortcut, but only in footnotes.