question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TST: the pandas test suite fails on 32bit systems

See original GitHub issue

I’ve been trying tonight to get the test suite to pass and keep getting some failures:

Results (25.73s):
     830 passed
       6 failed
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[None-nan]
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[None-unique_nulls_fixture22]
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[nan-None]
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[nan-unique_nulls_fixture22]
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[unique_nulls_fixture2-None]
         - pandas\tests\indexes/test_base.py:1370 TestIndex.test_get_indexer_with_NA_values[unique_nulls_fixture2-nan]
       2 xfailed
      63 skipped

The issue is related to integer dtypes:

E       AssertionError: numpy array are different
E
E       Attribute "dtype" are different
E       [left]:  int32
E       [right]: int64

Can anyone confirm if this is a failure on pandas on windows?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
topper-123commented, Sep 30, 2018

I’ve looked more into this and have found the culprit to be #22296.

https://github.com/pandas-dev/pandas/blob/f4fae353eaaa719db335ec2b21259932de30f46d/pandas/tests/indexes/test_base.py#L1382

I.e. in line 1382 in test_base.py, the dtype should be np.intp rather than np.int64.

Do people agree?

Returning platform dtype is the current behaviour for Index.get_indexer, e.g. (on pandas 0.23.1 on 32bit python on Windows 10):

In [1]: index = pd.Index(['a', 'b'], dtype=np.object)
In [2]: index.get_indexer(['a', 'b', 'c'])
Out[2]: array([ 0,  1, -1], dtype=int32)
0reactions
mroeschkecommented, Oct 2, 2018

The period error you found @h-vetinari was noted here: https://github.com/pandas-dev/pandas/issues/22905

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub Stats — Matplotlib 2.2.2 documentation
PR #10519: _macosx.m fails to compile on Mac OS 10.6.8 Snow Leopard ... Hide the backend.qt4/5 rcparam deprecation warning in test suite.
Read more >
Contributing to pandas — pandas 0.23.1 documentation
Running the test suite; Running the performance test suite; Documenting your code ... You'll need to have at least python3.5 installed on your...
Read more >
Memory error with large data sets for pandas.concat and ...
The above code indeed seems to work fine on Python 64bit. However I need to make it work for Python 32 as I...
Read more >
SciPy 1.5.0 Release Notes — SciPy v1.9.3 Manual
This release requires Python 3.6+ and NumPy 1.14.5 or greater. For running on PyPy, ... #11095: BUG: find_peaks_cwt test failures in 32-bit Linux...
Read more >
Testing Pandas Code - MungingData
This post explains how to test Pandas code with the built-in test helper methods and with the beavis functions that give more readable...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found