Skip to content

tools.tests.test_tile:TestCut.test_inf_handling generates error on FreeBSD #5536

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
neirbowj opened this issue Nov 17, 2013 · 3 comments
Closed
Labels
Testing pandas testing functions or related to the test suite

Comments

@neirbowj
Copy link
Contributor

$ nosetests -v pandas.tools.tests.test_tile:TestCut.test_inf_handling
test_inf_handling (pandas.tools.tests.test_tile.TestCut) ... ERROR

======================================================================
ERROR: test_inf_handling (pandas.tools.tests.test_tile.TestCut)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/obrienjw/src/github/pandas/pandas/tools/tests/test_tile.py", line 121, in test_inf_handling
    result = cut(data, [-np.inf, 2, 4, np.inf])
  File "/home/obrienjw/src/github/pandas/pandas/tools/tile.py", line 103, in cut
    include_lowest=include_lowest)
  File "/home/obrienjw/src/github/pandas/pandas/tools/tile.py", line 169, in _bins_to_cuts
    include_lowest=include_lowest)
  File "/home/obrienjw/src/github/pandas/pandas/tools/tile.py", line 205, in _format_levels
    fa, fb = fmt(a), fmt(b)
  File "/home/obrienjw/src/github/pandas/pandas/tools/tile.py", line 201, in <lambda>
    fmt = lambda v: _format_label(v, precision=prec)
  File "/home/obrienjw/src/github/pandas/pandas/tools/tile.py", line 235, in _format_label
    return '%d' % (-whole - 1)
TypeError: %d format: a number is required, not numpy.float64

----------------------------------------------------------------------
Ran 1 test in 0.002s

FAILED (errors=1)

My environment:

$ git describe
v0.12.0-1110-gd250d64
$ ci/print_versions.py

INSTALLED VERSIONS
------------------
Python: 2.7.5.final.0
OS: FreeBSD 9.2-PRERELEASE FreeBSD 9.2-PRERELEASE #0 r254955: Tue Aug 27 11:01:00 EDT 2013     [email protected]:/usr/obj/usr/src/sys/NARB amd64
byteorder: little
LC_ALL: None
LANG: None

pandas: Not installed
Cython: 0.19.1
Numpy: 1.7.0
Scipy: 0.12.1
statsmodels: Not installed
    patsy: Not installed
scikits.timeseries: Not installed
dateutil: 2.1
pytz: 2013.8
bottleneck: Not installed
PyTables: Not Installed
    numexpr: 2.2.2
matplotlib: 1.2.0
openpyxl: Not installed
xlrd: Not installed
xlwt: Not installed
xlsxwriter: Not installed
sqlalchemy: Not installed
lxml: Not installed
bs4: Not installed
html5lib: Not installed
bigquery: Not installed
apiclient: Not installed
@jreback
Copy link
Contributor

jreback commented Nov 27, 2013

can you retry this with current master? this was a problem in win32 as well (which is now fixed)

@neirbowj
Copy link
Contributor Author

Looks good with 0.13.0rc1 under Python 2.7.6.

$ nosetests -v pandas.tools.tests.test_tile:TestCut.test_inf_handling
test_inf_handling (pandas.tools.tests.test_tile.TestCut) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.003s

OK

Thank you.

@jreback
Copy link
Contributor

jreback commented Nov 30, 2013

gr8
pls post any further testing issues you have

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

No branches or pull requests

2 participants