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

Coerce to float64 when user tries to pass in float32 as float64 - fixes #1717 #2189

Conversation

justice-asare
Copy link
Contributor

@justice-asare justice-asare commented Apr 14, 2023

resolved #1717

Before

image

After
image

Some extra tests
image

image

@finos-cla-bot
Copy link

finos-cla-bot bot commented Apr 14, 2023

Thank you for your contribution and Welcome to our Open Source Community!

To make sure your pull request is accepted successfully, we ask all our open source contributors to sign a Contributor License Agreement; having reviewed our contributor list, we require a CLA for the following people : (@justice-asare).

In order to sign a CLA with FINOS, just submit a Pull Request with a simple change to this file (adding an empty line, or some random text at the bottom); this will trigger the EasyCLA bot, which will post a comment to the Pull Request stating whether all PR contributors are covered by FINOS CLA; if not covered, the bot will post instructions on how to sign the CLA.

Thanks once again for your contribution. Let us work with you to make the CLA process quick, easy and efficient so we can move forward with reviewing and accepting your pull request. Feel free to email help@finos.org for any questions.

cc @TheJuanAndOnly99 @mcleo-d

@timkpaine
Copy link
Member

timkpaine commented Apr 14, 2023

These both work:
Screenshot 2023-04-14 at 11 24 00

The code in the issue explicitly tells the table to use float (which is float64) which leads to it parsing the array as float64 instead of float32. I'm comfortable with these changes, which are more of a "help the user not make a mistake" rather than a bug fix, but they'll need tests added.

@timkpaine timkpaine changed the title resolved incorrect parsing of float32 dtype in dataframe - 1717 Coerce to float64 when user tries to pass in float32 as float64 - fixes #1717 Apr 14, 2023
@justice-asare
Copy link
Contributor Author

Could you please specify the tests that are required in more detail?

@timkpaine
Copy link
Member

timkpaine commented Apr 14, 2023

tests that cover the new code added

see the Pull request template
and Contributing docs

Please make sure PRs include:
Tests asserting behavior of any new or modified features.

@justice-asare
Copy link
Contributor Author

@cla-bot[bot] check

@finos-cla-bot
Copy link

finos-cla-bot bot commented Apr 19, 2023

Thank you for your contribution and Welcome to our Open Source Community!

To make sure your pull request is accepted successfully, we ask all our open source contributors to sign a Contributor License Agreement; having reviewed our contributor list, we require a CLA for the following people : (@justice-asare).

In order to sign a CLA with FINOS, just submit a Pull Request with a simple change to this file (adding an empty line, or some random text at the bottom); this will trigger the EasyCLA bot, which will post a comment to the Pull Request stating whether all PR contributors are covered by FINOS CLA; if not covered, the bot will post instructions on how to sign the CLA.

Thanks once again for your contribution. Let us work with you to make the CLA process quick, easy and efficient so we can move forward with reviewing and accepting your pull request. Feel free to email help@finos.org for any questions.

cc @TheJuanAndOnly99 @mcleo-d

@finos-cla-bot
Copy link

finos-cla-bot bot commented Apr 19, 2023

The cla-bot has been summoned, and re-checked this pull request!

@TheJuanAndOnly99
Copy link
Member

@cla-bot[bot] check

@finos-cla-bot
Copy link

finos-cla-bot bot commented Apr 19, 2023

The cla-bot has been summoned, and re-checked this pull request!

@justice-asare justice-asare force-pushed the FNOS-6-float-32-dtype-in-dataframe-is-parsed-incorrectly branch from e563e1b to b2714a3 Compare April 19, 2023 15:54
@texodus texodus requested a review from timkpaine April 19, 2023 23:03
@texodus texodus added the bug Concrete, reproducible bugs label Apr 19, 2023
@timkpaine timkpaine self-assigned this Apr 20, 2023
Copy link
Member

@timkpaine timkpaine left a comment

Choose a reason for hiding this comment

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

There are likely more conversions for us to do outside the scope of the original ticket, but I'm happy with this change as is.

@justice-asare
Copy link
Contributor Author

I'm glad to hear that you're satisfied with the current change.

@texodus
Copy link
Member

texodus commented Apr 21, 2023

@timkpaine I would like to see whatever changes you want in Issues if you can please!

@texodus texodus merged commit 66b9dbd into finos:master Apr 21, 2023
@texodus
Copy link
Member

texodus commented Apr 21, 2023

Thanks for the PR! Looks good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Concrete, reproducible bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

float32 dtype in dataframe is parsed incorrectly
4 participants