Skip to content

Implement libinternals #19293

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

Closed
wants to merge 4 commits into from
Closed

Conversation

jbrockmendel
Copy link
Member

A bunch of functions from lib that are only used in core.internals, have light dependencies.

Small optimizations: made slice_getitem a cdef instead of def, use PySlice_Check instead of isinstance.

@jreback
Copy link
Contributor

jreback commented Jan 18, 2018

pls just do a move. do a followup to change things. when you move a file its impossible to tell diffs.

@jreback jreback added Internals Related to non-user accessible pandas implementation Clean labels Jan 18, 2018
@jbrockmendel
Copy link
Member Author

OK, just changed to be pure cut/paste, will do optimizations in follow-up.

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

this is fine. waiting on travis. certainly take optimzations (pls back it up with a timeit run as you asv seem broken :<). and doc-strings in a followup.



cdef class BlockPlacement:
# __slots__ = '_as_slice', '_as_array', '_len'
Copy link
Contributor

Choose a reason for hiding this comment

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

in followup is fine, pls add doc-strings

return BlockPlacement(np.concatenate([self.as_array] +
[o.as_array for o in others]))

cdef iadd(self, other):
Copy link
Contributor

Choose a reason for hiding this comment

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

these should prob be typed

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep. Bunch of small things like this I'll do in the next pass. For now it's pure cut/paste.

@jreback jreback added this to the 0.23.0 milestone Jan 18, 2018
@jreback
Copy link
Contributor

jreback commented Jan 18, 2018

shouldn't this be called internals and not libinternals?

@jbrockmendel
Copy link
Member Author

shouldn't this be called internals and not libinternals?

The filename is "internals.pyx". I've gotten used to the convention import pandas._libs.internals as libinternals

@jreback
Copy link
Contributor

jreback commented Jan 19, 2018

thanks!

@jreback jreback closed this in 1c0a48c Jan 19, 2018
@jreback
Copy link
Contributor

jreback commented Jan 19, 2018

follow up for docs and small optimizations ok

@jbrockmendel
Copy link
Member Author

Huh? Was this meant to be closed or merged?

@jreback
Copy link
Contributor

jreback commented Jan 19, 2018

it is merged

see the hash above

@jbrockmendel jbrockmendel deleted the libinternals branch January 19, 2018 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Internals Related to non-user accessible pandas implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants