New issue 2511: Refcheck error using latest pandas 0.9.12 with PyPy 5.7.0
https://bitbucket.org/pypy/pypy/issues/2511/refcheck-error-using-latest-pandas-0912
David Moss:
A very simple and innocuous looking bit of pandas code is failing with the
latest official release of PyPy running the latest version of pandas.
**Version**
```
#!
» pypy --version
Python 2.7.13 (fa3249d55d15, Mar 19 2017, 19:48:32)
[PyPy 5.7.0 with GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
» pypy -c 'import pandas; print(pandas.__version__)'
0.19.2
```
**Minimal Test Case**
```
#!python
import pandas as pd
df = pd.DataFrame({'x': ['a', 'b', 'b']})
df['x'].unique()
```
It generate the following error.
```
#!
Traceback (most recent call last):
File "refcheck_error.py", line 3, in <module>
print(df['x'].unique())
File "/Users/dm/pypy-latest/site-packages/pandas/core/series.py", line 1241,
in unique
result = super(Series, self).unique()
File "/Users/dm/pypy-latest/site-packages/pandas/core/base.py", line 973, in
unique
result = unique1d(values)
File "/Users/dm/pypy-latest/site-packages/pandas/core/nanops.py", line 811,
in unique1d
uniques = table.unique(_ensure_object(values))
File "pandas/src/hashtable_class_helper.pxi", line 826, in
pandas.hashtable.PyObjectHashTable.unique (pandas/hashtable.c:14521)
ValueError: cannot resize an array with refcheck=True on PyPy.
Use the resize function or refcheck=False
```
Runs quite happily under CPython on the same system.
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue