Skip to content

Cast input data as np.float64 in biweight functions - #6905

Merged
crawfordsm merged 3 commits into
astropy:masterfrom
larrybradley:biw
Dec 5, 2017
Merged

crawfordsm merged 3 commits into
astropy:masterfrom
larrybradley:biw

Conversation

@larrybradley

Copy link
Copy Markdown
Member

I often see floating underflows/overflows in the biweight stat functions when using float32 arrays. This PR casts the input arrays as float64, which prevents the runtime warnings.

This is more a fix than a feature, so I set the milestone as 2.0.3 -- feel free to change. Also, is a changelog necessary for this small change?

@astropy-bot

astropy-bot Bot commented Nov 29, 2017 •

Copy link
Copy Markdown

Hi there @larrybradley 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

If there are any issues with this message, please report them here.

@pllim

pllim commented Nov 29, 2017

Copy link
Copy Markdown
Member

IMHO fixing underflow/overflow that happens often warrants a change log. Doesn't hurt, right?

@larrybradley

Copy link
Copy Markdown
Member Author

@pllim Done!

@pllim

pllim commented Nov 29, 2017

Copy link
Copy Markdown
Member

Is adding a test possible? It seems like this fix is not currently tested in CI. 😅

@bsipocz

bsipocz commented Dec 5, 2017

Copy link
Copy Markdown
Member

@larrybradley - Could you add a test for this? and @crawfordsm could you sign it off, so it actually can go into 2.0.3?

@larrybradley

Copy link
Copy Markdown
Member Author

Test added!

@crawfordsm
crawfordsm merged commit 703f326 into astropy:master Dec 5, 2017
@larrybradley
larrybradley deleted the biw branch December 5, 2017 20:11
bsipocz pushed a commit that referenced this pull request Dec 5, 2017
Cast input data as np.float64 in biweight functions
@pllim pllim mentioned this pull request Mar 10, 2023
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants