Skip to content

2 tests failures on 32bit: test_searchsorted_sorter and test_sparse_max_row #12927

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
yarikoptic opened this issue Apr 19, 2016 · 5 comments
Closed
Labels
Compat pandas objects compatability with Numpy or Python functions Testing pandas testing functions or related to the test suite
Milestone

Comments

@yarikoptic
Copy link
Contributor

While building a fresh snapshot (6c692ae) for debians ran into the following consistent one on debian stable and testing (built fine on 64bit, but failed in 32bit userspace):

======================================================================
ERROR: test_searchsorted_sorter (pandas.tests.series.test_analytics.TestSeriesAnalytics)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pandas-0.18.0+git114-g6c692ae/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/series/test_analytics.py", line 1331, in test_searchsorted_sorter
    r = s.searchsorted([0, 3], sorter=np.argsort(s))
  File "/build/pandas-0.18.0+git114-g6c692ae/debian/tmp/usr/lib/python2.7/dist-packages/pandas/core/series.py", line 1488, in searchsorted
    side=side, sorter=sorter)
ValueError: could not parse sorter argument

======================================================================
FAIL: test_sparse_max_row (pandas.tests.formats.test_format.TestSeriesFormatting)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pandas-0.18.0+git114-g6c692ae/debian/tmp/usr/lib/python2.7/dist-packages/pandas/tests/formats/test_format.py", line 3724, in test_sparse_max_row
    self.assertEqual(result, exp)
AssertionError: '0    1.0\n1    NaN\n2    NaN\n3    3.0\n4    NaN\ndtype: float64\nBlockIndex\nBlock locations: array([0, 3])\nBlock lengths: array([1, 1])' != '0    1.0\n1    NaN\n2    NaN\n3    3.0\n4    NaN\ndtype: float64\nBlockIndex\nBlock locations: array([0, 3], dtype=int32)\nBlock lengths: array([1, 1], dtype=int32)'

I will replicate in interactive env atm, but thought that may be you have dealt with it already or smth so I wouldn't ;-)

@jreback
Copy link
Contributor

jreback commented Apr 19, 2016

what is your numpy version here? we are still working thru a bunch of numpy issues of numpy > 1.11

@jreback
Copy link
Contributor

jreback commented Apr 19, 2016

cc @sinhrks for the 2nd. though we only test on 32-bit vms very occasionally.

@jreback jreback added Testing pandas testing functions or related to the test suite Compat pandas objects compatability with Numpy or Python functions labels Apr 19, 2016
@yarikoptic
Copy link
Contributor Author

On Tue, 19 Apr 2016, Jeff Reback wrote:

what is your numpy version here? we are still working thru a bunch of
numpy issues of numpy > 1.11

e.g. Debian stable has good old 1.8.2

here is more information about sorter argument

1483
1484 @substitution(klass='Series', value='v')
1485 @appender(base._shared_docs['searchsorted'])
1486 def searchsorted(self, v, side='left', sorter=None):
1487 return self._values.searchsorted(Series(v)._values,
1488 -> side=side, sorter=sorter)
1489
1490 # -------------------------------------------------------------------
1491 # Combination
1492
1493 def append(self, to_append, verify_integrity=False):
(Pdb) p sorter
0 1
1 2
2 0
dtype: int64
(Pdb) p type(sorter)
<class 'pandas.core.series.Series'>

and here is easier to digest (explicit dtype listed) for the 2nd one

(Pdb) p result
'0 1.0\n1 NaN\n2 NaN\n3 3.0\n4 NaN\ndtype: float64\nBlockIndex\nBlock locations: array([0, 3])\nBlock lengths: array([1, 1])'
(Pdb) p exp
'0 1.0\n1 NaN\n2 NaN\n3 3.0\n4 NaN\ndtype: float64\nBlockIndex\nBlock locations: array([0, 3], dtype=int32)\nBlock lengths: array([1, 1], dtype=int32)'

@sinhrks
Copy link
Member

sinhrks commented Apr 30, 2016

Is 2nd case has been fixed by #12936? (thanks, @jreback)

jreback added a commit to jreback/pandas that referenced this issue Apr 30, 2016
closes pandas-dev#12927

TST: use 32bit_repr when printing formatting of sparse

COMPAT: ensure consensus name when Indexes are union/intersected if possible

COMPAT: skip some coercion tests on 32-bit
@jreback jreback added this to the 0.18.1 milestone Apr 30, 2016
@jreback
Copy link
Contributor

jreback commented Apr 30, 2016

@yarikoptic master should be clean now on 32bit platforms.

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 Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants