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

remove numpy_helper and some unneeded util functions #22469

Merged
merged 1 commit into from
Aug 29, 2018

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

# libindex.get_value_at will end up calling __getitem__,
# so to avoid recursing we need to unwrap `self` so the
# ndarray.__getitem__ implementation is called.
return libindex.get_value_at(np.asarray(self), sp_loc)
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm pretty sure this will be unnecessary after #22325.

@codecov
Copy link

codecov bot commented Aug 23, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@2be2ba5). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master   #22469   +/-   ##
=========================================
  Coverage          ?   92.04%           
=========================================
  Files             ?      169           
  Lines             ?    50740           
  Branches          ?        0           
=========================================
  Hits              ?    46705           
  Misses            ?     4035           
  Partials          ?        0
Flag Coverage Δ
#multiple 90.45% <100%> (?)
#single 42.24% <0%> (?)
Impacted Files Coverage Δ
pandas/core/sparse/array.py 91.38% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2be2ba5...10e6205. Read the comment docs.

@jreback jreback added the Clean label Aug 23, 2018
@jreback jreback added this to the 0.24.0 milestone Aug 23, 2018
@jreback
Copy link
Contributor

jreback commented Aug 23, 2018

lgtm. any perf impact?

@jbrockmendel
Copy link
Member Author

any perf impact?

It tentatively looks like the direct indexing is an improvement.

In [4]: arr = np.arange(100000)

In [5]: o = arr.astype('O')

In [6]: %timeit out = lib.astype_intsafe(o, 'i8')

Master:
100 loops, best of 3: 9.47 ms per loop
100 loops, best of 3: 16.3 ms per loop
100 loops, best of 3: 13.8 ms per loop

PR:
100 loops, best of 3: 8.65 ms per loop
100 loops, best of 3: 13.4 ms per loop
100 loops, best of 3: 7.6 ms per loop

In [14]: %timeit out = lib.astype_unicode(o)

Master:
10 loops, best of 3: 43.4 ms per loop
10 loops, best of 3: 63.1 ms per loop
10 loops, best of 3: 70.1 ms per loop
10 loops, best of 3: 68.2 ms per loop

PR:
10 loops, best of 3: 23.1 ms per loop
10 loops, best of 3: 41.4 ms per loop
10 loops, best of 3: 62.9 ms per loop
10 loops, best of 3: 60.4 ms per loop

@jreback jreback merged commit e28d2a6 into pandas-dev:master Aug 29, 2018
@jreback
Copy link
Contributor

jreback commented Aug 29, 2018

thanks!

@jbrockmendel jbrockmendel deleted the nohelp2 branch August 29, 2018 13:41
gfyoung added a commit to forking-repos/pandas that referenced this pull request Sep 29, 2018
jbrockmendel pushed a commit that referenced this pull request Sep 29, 2018
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants