Skip to content

CLN: used np.__version__ and removed instantiation #14988

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

Merged
merged 1 commit into from
Dec 26, 2016
Merged

CLN: used np.__version__ and removed instantiation #14988

merged 1 commit into from
Dec 26, 2016

Conversation

john-a-m
Copy link
Contributor

@rkern and others recommend using np.__version__ instead of np.version. However I realize this is pandas "internals" so there may be some reason for using np.version over np.__version__. I could not find any such reason. I also removed a duplicate LooseVersion(_np_version) and reused the existing _nlv instance.

  • doesn't close any issue, that I'm aware of
  • I ran nosetests .\pandas\tests\test_compat.py and 5 tests passed
  • couldn't get the git command to work, but flake8 .\compat\numpy\__init__.py passes fine
  • whatsnew entry should be covered by several new features, enhancements, and performance improvements in the v0.20.0.txt file

@rkern and others [recommend](http://stackoverflow.com/questions/1520234/how-to-check-which-version-of-numpy-im-using) using `np.__version__` instead of `np.version`. However I realize this is pandas "internals" so there may be some reason for using `np.version` over `np.__version__`. I could not find any such reason. I also removed  a duplicate `LooseVersion(_np_version)` and reused the existing `_nlv` instance.
@codecov-io
Copy link

Current coverage is 84.66% (diff: 100%)

Merging #14988 into master will not change coverage

@@             master     #14988   diff @@
==========================================
  Files           144        144          
  Lines         51056      51056          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43225      43225          
  Misses         7831       7831          
  Partials          0          0          

Powered by Codecov. Last update aba7d25...f56a7ff

@jorisvandenbossche jorisvandenbossche added Clean Compat pandas objects compatability with Numpy or Python functions labels Dec 26, 2016
@jorisvandenbossche jorisvandenbossche added this to the 0.20.0 milestone Dec 26, 2016
@jreback
Copy link
Contributor

jreback commented Dec 26, 2016

@john-a-m that's a really old link, but in any event, __version__ is usually the recommended way. so thank you.

@jreback jreback merged commit 7a79c1a into pandas-dev:master Dec 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants