Explicitly set dtype of np.lexsort in group_rank
State: closed

xref #19481

I didn't see any other instance in `group_rank` where the dtype was open to interpretation, so I'm wondering if `np.lexsort` is returning a plain `int` on 32 bit systems. Hoping that explicitly getting a view of that `np.lexsort` result to match the dtype of `_as` will resolve the test issues

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
ping on green.
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=h1) Report
> Merging [#19679](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/df38f66b417b754afdd2b0e17282255bbf2c769e?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/19679/graphs/tree.svg?src=pr&token=eZ4WkYLtcO&width=650&height=150)](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=tree)

```diff
@@           Coverage Diff           @@
##           master   #19679   +/-   ##
=======================================
  Coverage   91.58%   91.58%           
=======================================
  Files         150      150           
  Lines       48864    48864           
=======================================
  Hits        44752    44752           
  Misses       4112     4112
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.95% <ø> (ø)` | :arrow_up: |
| #single | `41.75% <ø> (ø)` | :arrow_up: |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=footer). Last update [df38f66...fe5245b](https://codecov.io/gh/pandas-dev/pandas/pull/19679?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@jreback should be good to go. Couple failures on the optional Travis tests that appear unrelated
yeah these are actually NOT optional. they seem to be failing very recently. @TomAugspurger any idea what is happening?
This is segaulting: https://travis-ci.org/MacPython/pandas-wheels/jobs/341233134

can you install a 32-bit version of miniconda and see if you can track the problem?

dl from https://repo.continuum.io/miniconda/


https://travis-ci.org/pandas-dev/pandas/jobs/341072093 for the failure about 

```
    Exception: Cython-generated file 'pandas/_libs/algos.c' not found.
                    Cython is required to compile pandas from a development branch.
                    Please install Cython or download a release package of pandas.
```

I don't know why https://travis-ci.org/pandas-dev/pandas/jobs/341072091 timed out. Something in our build step seems to sometimes take a way longer time.
I installed a 32 bit version of conda on my system, but can't seem to import pandas to debug. When trying to build I get the same error that Tom is getting above, and on import I get the below - is there an easy way to configure the development environment for a 32 bit installation to match what the Travis builds are doing?

```python
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "pandas/__init__.py", line 19, in <module>
    "Missing required dependencies {0}".format(missing_dependencies))
ImportError: Missing required dependencies ['pytz']
```

<details>

```bash

# packages in environment at /Users/williamayd/miniconda3_32/envs/py27_32:
#
alabaster                 0.7.3                    py27_0  
babel                     2.0                      py27_0  
cython                    0.23.1                   py27_0  
docutils                  0.12                     py27_0  
jinja2                    2.8                      py27_0  
markupsafe                0.23                     py27_0  
numpy                     1.9.2                    py27_0  
openssl                   1.0.1k                        1  
ortools-examples          6.4.4495                  <pip>
pip                       7.1.2                    py27_0  
py                        1.5.2                      py_0  
pygments                  2.0.2                    py27_0  
pytest                    3.2.2                      py_0  
python                    2.7.10                        0  
python-dateutil           2.4.2                    py27_0  
pytz                      2018.3                     py_0  
readline                  6.2                           2  
setuptools                18.1                     py27_0  
six                       1.9.0                    py27_0  
snowballstemmer           1.2.0                    py27_0  
sphinx                    1.3.1                    py27_0  
sphinx-rtd-theme          0.1.7                     <pip>
sphinx_rtd_theme          0.1.7                    py27_0  
sqlite                    3.8.4.1                       1  
tk                        8.5.18                        0  
wheel                     0.24.0                   py27_0  
zlib                      1.2.8                         0
```
</details>
Alright I was able to get an environment configured using `pip` instead of `conda`. FWIW I don't think the latter is a possibility to use. At the very least, the latest osx32 `python-dateutil` package on anaconda is `2.4.2` but pandas requires at least `2.5.0`
right but can alwyas pip install dateutil
Good to hear. I think Anaconda dropped official support for osx-32 a while
back.

On Wed, Feb 14, 2018 at 1:19 PM, William Ayd <notifications@github.com>
wrote:

> Alright I was able to get an environment configured using pip instead of
> conda. FWIW I don't think the latter is a possibility to use. At the very
> least, the latest osx32 python-dateutil package on anaconda is 2.4.2 but
> pandas requires at least 2.5.0
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/19679#issuecomment-365715566>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABQHIgB2fBZacH5NVRLjtd22KvQpXeRSks5tUzHDgaJpZM4SEMAL>
> .
>