8000 Omit `nan`s when running `rdms.rank_transform`. by caiw · Pull Request #403 · rsagroup/rsatoolbox · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Omit nans when running rdms.rank_transform. #403

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 4 commits into from
Jul 16, 2024

Conversation

caiw
Copy link
Member
@caiw caiw commented Jul 16, 2024

By specifying nan_policy='omit' in scipy.rankdata(), nans in the input RDM will be carried through to the output. In other words, nans will be preserved, and ignored in the ranking progress.

Fixes #402

@caiw caiw added the bug Something isn't working label Jul 16, 2024
@caiw caiw self-assigned this Jul 16, 2024
@caiw caiw linked an issue Jul 16, 2024 that may be closed by this pull request
@caiw caiw requested a review from JasperVanDenBosch July 16, 2024 12:25
@JasperVanDenBosch
Copy link
Contributor

One sec, I'm gonna add a test

@caiw
Copy link
Member Author
caiw commented Jul 16, 2024

One sec, I'm gonna add a test

Yes, sorry, I should have done this!

@caiw caiw changed the title Omit nans when running rdms.rank_transform. Omit nans when running rdms.rank_transform. Jul 16, 2024
Copy link
Contributor
@JasperVanDenBosch JasperVanDenBosch left a comment

Choose a reason for hiding this comment

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

Thanks @caiw ! I'll ping you when a new development version is out with this patch.

@JasperVanDenBosch JasperVanDenBosch merged commit 82b105e into main Jul 16, 2024
22 checks passed
@JasperVanDenBosch JasperVanDenBosch deleted the 402-rdmsrank_transform-treats-nans-as-data branch July 16, 2024 13:27
@JasperVanDenBosch
Copy link
Contributor

@caiw This is now released as 0.1.6.dev52 on pypi

@caiw
Copy link
Member Author
caiw commented Jul 16, 2024

Thanks @JasperVanDenBosch! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rdms.rank_transform treats nans as data
2 participants
0