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

BUG fix IntegerArray.astype int -> uint #22441

Merged
merged 2 commits into from Aug 22, 2018

Conversation

Projects
None yet
2 participants
@jorisvandenbossche
Copy link
Member

commented Aug 21, 2018

Closes #22440

@@ -409,8 +409,7 @@ def astype(self, dtype, copy=True):

# if we are astyping to an existing IntegerDtype we can fastpath
if isinstance(dtype, _IntegerDtype):
result = self._data.astype(dtype.numpy_dtype,
casting='same_kind', copy=False)

This comment has been minimized.

Copy link
@jorisvandenbossche

jorisvandenbossche Aug 21, 2018

Author Member

@jreback do you remember what the reason was to explicitly put casting='same_kind' ?

This comment has been minimized.

Copy link
@jreback

jreback Aug 21, 2018

Contributor

iirc was to make sure we were
only coercing actual ints (and would raise on floats)

This comment has been minimized.

Copy link
@jorisvandenbossche

jorisvandenbossche Aug 21, 2018

Author Member

But since we have the if isinstance(dtype, _IntegerDtype):, we are sure about that? (so it can never be a float dtype)

This comment has been minimized.

Copy link
@jreback

jreback Aug 22, 2018

Contributor

it might have been an artificat.

@codecov

This comment has been minimized.

Copy link

commented Aug 21, 2018

Codecov Report

Merging #22441 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #22441   +/-   ##
=======================================
  Coverage   92.05%   92.05%           
=======================================
  Files         169      169           
  Lines       50733    50733           
=======================================
  Hits        46702    46702           
  Misses       4031     4031
Flag Coverage Δ
#multiple 90.46% <100%> (ø) ⬆️
#single 42.24% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/arrays/integer.py 94.55% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 68273a7...26afccf. Read the comment docs.

@jreback jreback added this to the 0.24.0 milestone Aug 22, 2018

@jreback jreback merged commit 1584530 into pandas-dev:master Aug 22, 2018

0 of 6 checks passed

ci/circleci: py27_compat Your tests are queued behind your running builds
Details
ci/circleci: py35_ascii Your tests are queued behind your running builds
Details
ci/circleci: py36_locale Your tests are queued behind your running builds
Details
ci/circleci: py36_locale_slow Your tests are queued behind your running builds
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
@jreback

This comment has been minimized.

Copy link
Contributor

commented Aug 22, 2018

thanks!

@jorisvandenbossche jorisvandenbossche deleted the jorisvandenbossche:integer-array-casting branch Aug 22, 2018

Sup3rGeo added a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.