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

COMPAT: Ensure rolling indexers return intp #35228

Closed
wants to merge 3 commits into from

Conversation

mroeschke
Copy link
Member

Unable to test this locally for the MacPython build, but I am pretty sure this is the main culprit of that failing job.

@mroeschke mroeschke added Compat pandas objects compatability with Numpy or Python functions Window rolling, ewma, expanding labels Jul 11, 2020
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

you can leave entirely in int64 as we do now for all rolling ops

except when you are going to .take() something u have to wrap ensure_intp_dtype around the array

windows should be affected but pass by this change

@mroeschke
Copy link
Member Author

Wouldn't it be better if all the indexers were just platform int to begin with so we don't have to worry about casting?

@mroeschke mroeschke added this to the 1.1 milestone Jul 12, 2020
@jreback
Copy link
Contributor

jreback commented Jul 12, 2020

no int64 are fine

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

@mroeschke none of this is needed or a good idea. you only need to ensure_platform_int when indexing via .take

@mroeschke mroeschke modified the milestones: 1.1, 1.1.1 Jul 13, 2020
@mroeschke
Copy link
Member Author

Going to start over in a new branch

@mroeschke mroeschke closed this Jul 14, 2020
@mroeschke mroeschke deleted the indexer_intp branch July 14, 2020 04:43
@TomAugspurger
Copy link
Contributor

@mroeschke none of this is needed or a good idea. you only need to ensure_platform_int when indexing via .take

How do we know that it's safe to cast at take time? Ensuring that indicies are the platform int seems like the way to go.

@TomAugspurger
Copy link
Contributor

@mroeschke in case it helps, here's the dockerfile I'm using locally

FROM quay.io/pypa/manylinux1_i686

RUN /opt/python/cp38-cp38/bin/python -m pip install \
  cython \
  numpy \
  python-dateutil \
  pytz \
  pytest \
  hypothesis
COPY pandas /pandas
RUN cd /pandas && /opt/python/cp38-cp38/bin/python setup.py build_ext -i -j 4

Then run it and mount the pandas/ directory to /pandas so you can easily test things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Window rolling, ewma, expanding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: MacPython failing test_consistency_with_window
3 participants