Skip to content

Harmonize all ndimage usage across the library - #1550

Merged
JDWarner merged 4 commits into
scikit-image:masterfrom
jni:ndi
Jun 11, 2015
Merged

JDWarner merged 4 commits into
scikit-image:masterfrom
jni:ndi

Conversation

@jni

@jni jni commented Jun 9, 2015

Copy link
Copy Markdown
Member

Only two forms remain in use:

  • from scipy import ndimage as ndi
  • from scipy.ndimage import function

jni added 2 commits June 9, 2015 11:45
Only two forms remain in use:

- `from scipy import ndimage as ndi`
- `from scipy.ndimage import function`
@tacaswell

Copy link
Copy Markdown
Contributor

That looks like no fun at all....

@jni

jni commented Jun 10, 2015

Copy link
Copy Markdown
Member Author

@tacaswell what? I love doing repetitive but always slightly different regex searches and substitutions across a whole library... =P

@JDWarner

Copy link
Copy Markdown
Contributor

For the record, I have nothing against avoiding an alias entirely in favor of ndimage, though at times the extra characters make holding to 80 chars per line awkward.

@vighneshbirodkar

Copy link
Copy Markdown
Contributor

... in CONTRIBUTING.txt for future contributions.
@jni

jni commented Jun 10, 2015

Copy link
Copy Markdown
Member Author

@JDWarner I do have something against avoiding aliases. =)

@vighneshbirodkar done, thanks for the catch!

Comment thread skimage/transform/_geometric.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's break these into separate lines for ndi and spatial.

@JDWarner

Copy link
Copy Markdown
Contributor

@jni I really thought this was more standardized! I have only the one comment.

This improves the readability of the import code and is in line with
PEP8 recommendations.
@jni

jni commented Jun 11, 2015

Copy link
Copy Markdown
Member Author

@JDWarner you and I both! I think this is part of the advantage of scikit-image's modularity. =) Fixed!

@JDWarner

Copy link
Copy Markdown
Contributor

Thanks, @jni!

JDWarner added a commit that referenced this pull request Jun 11, 2015
STY: Harmonize scipy.ndimage usage across the library
@JDWarner
JDWarner merged commit 7132df7 into scikit-image:master Jun 11, 2015
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.

4 participants