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

ENH: Add isnan, notnan, and isfinite Factor methods. #861

Merged
merged 1 commit into from Nov 19, 2015

Conversation

Projects
None yet
2 participants
@ssanderson
Member

ssanderson commented Nov 19, 2015

It's very common to want to filter out NaN, inf, and -inf values from Factors. This provides those operations as efficient builtins.

@llllllllll llllllllll added the Pipeline label Nov 19, 2015

A Filter producing True for values where this Factor is anything but
NaN, inf, or -inf.
"""
return (-inf < self) & (self < inf)

This comment has been minimized.

@llllllllll

llllllllll Nov 19, 2015

Member

how does:np.isinf compare

This comment has been minimized.

@ssanderson

ssanderson Nov 19, 2015

Member

isinf is the inverse of this. This is mimicking np.isfinite.

@llllllllll

This comment has been minimized.

Member

llllllllll commented Nov 19, 2015

one comment, otherwise lgtm

ssanderson added a commit that referenced this pull request Nov 19, 2015

Merge pull request #861 from quantopian/pipeline-isnan
ENH: Add isnan, notnan, and isfinite Factor methods.

@ssanderson ssanderson merged commit c5d5cfd into master Nov 19, 2015

2 checks passed

Scrutinizer 2 new issues, 8 updated code elements
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ssanderson ssanderson deleted the pipeline-isnan branch Nov 19, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment