Skip to content

BUG: conversion of uint64 to float when taking #15362

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
jreback opened this issue Feb 10, 2017 · 5 comments
Closed

BUG: conversion of uint64 to float when taking #15362

jreback opened this issue Feb 10, 2017 · 5 comments
Labels
Bug Closing Candidate May be closeable, needs more eyeballs Dtype Conversions Unexpected or buggy dtype conversions

Comments

@jreback
Copy link
Contributor

jreback commented Feb 10, 2017

62fe71e#r100575113

# master
In [1]: pandas.core.algorithms.take_nd(np.array([0, 1], dtype='uint64'), np.array([0, -1]))
Out[1]: array([  0.,  nan])

# with this change above
In [5]: pandas.core.algorithms.take_nd(np.array([0, 1], dtype='uint64'), np.array([0, -1]))
Out[5]: array([                   0, 18446744073709551615], dtype=uint64)

mainly need some more testing w.r.t. this (e.g. pandas.types.cast._maybe_promote).

@jreback jreback added Bug Difficulty Intermediate Dtype Conversions Unexpected or buggy dtype conversions labels Feb 10, 2017
@jreback jreback added this to the 0.20.0 milestone Feb 10, 2017
@jreback
Copy link
Contributor Author

jreback commented Feb 10, 2017

cc @gfyoung

@jreback
Copy link
Contributor Author

jreback commented Feb 10, 2017

this is not going to work as lots of code relies on this. This is using the np.iinfo(np.uint64).max as the missing value value.

In any event we should do something here, maybe treat uint with a missing value as an object dtype for now.

@jreback
Copy link
Contributor Author

jreback commented Feb 10, 2017

I took a different path in #15245

@jbrockmendel
Copy link
Member

im not clear on what the bug is here. the behavior looks correct (both in OP and master)

@jbrockmendel jbrockmendel added the Closing Candidate May be closeable, needs more eyeballs label Nov 29, 2021
@mroeschke
Copy link
Member

Agreed, closing as this looks like the correct behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Closing Candidate May be closeable, needs more eyeballs Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

No branches or pull requests

5 participants