Skip to content

Use the resize function or refcheck=False #17182

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
BigAN opened this issue Aug 6, 2017 · 6 comments
Closed

Use the resize function or refcheck=False #17182

BigAN opened this issue Aug 6, 2017 · 6 comments
Labels
Compat pandas objects compatability with Numpy or Python functions

Comments

@BigAN
Copy link

BigAN commented Aug 6, 2017

use pypy 5.8.0 with pandas 0.20.3

File "/Users/dongjian/work/meituan/instacart/preprocess/data_producer.py", line 37, in
priors_orders_detail = orders.merge(right=priors, how='inner', on='order_id')
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/frame.py", line 4722, in merge
copy=copy, indicator=indicator)
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 54, in merge
return op.get_result()
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 569, in get_result
join_index, left_indexer, right_indexer = self._get_join_info()
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 734, in _get_join_info
right_indexer) = self._get_join_indexers()
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 713, in _get_join_indexers
how=self.how)
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 982, in _get_join_indexers
llab, rlab, shape = map(list, zip(* map(fkeys, left_keys, right_keys)))
File "/usr/local/Cellar/pypy/5.8.0/libexec/lib_pypy/_functools.py", line 45, in call
return self._func(*(self._args + fargs), **fkeywords)
File "/usr/local/Cellar/pypy/5.8.0/libexec/site-packages/pandas/core/reshape/merge.py", line 1405, in _factorize_keys
llab = rizer.factorize(lk)
File "pandas/_libs/hashtable.pyx", line 102, in pandas._libs.hashtable.Int64Factorizer.factorize (pandas/_libs/hashtable.c:35063)
File "pandas/_libs/hashtable_class_helper.pxi", line 867, in pandas._libs.hashtable.Int64HashTable.get_labels (pandas/_libs/hashtable.c:15602)
File "pandas/_libs/hashtable_class_helper.pxi", line 180, in pandas._libs.hashtable.Int64Vector.resize (pandas/_libs/hashtable.c:5241)
ValueError: cannot resize an array with refcheck=True on PyPy.
Use the resize function or refcheck=False

@chris-b1
Copy link
Contributor

chris-b1 commented Aug 6, 2017

@mattip ?

@chris-b1
Copy link
Contributor

chris-b1 commented Aug 6, 2017

@BigAN - can you please make this a runnable, reproducible example?

@chris-b1
Copy link
Contributor

chris-b1 commented Aug 6, 2017

And for the record, we don't officially support PyPy at the moment. @mattip has done some nice work to help with compat, but I think it would accurately described as "in-progress"
https://bitbucket.org/pypy/pypy/wiki/cpyext_2_-_cython_and_pandas

@mattip
Copy link
Contributor

mattip commented Aug 6, 2017

This was supposed to be fixed by pull request #16258. What does numpy.__version__ show?

@mattip
Copy link
Contributor

mattip commented Aug 6, 2017

It seems that pull request did not make it into pandas 0.20.3, can you rerun your code with pandas HEAD, so something like pip uninstall pandas thenpip install git+https://github.com/pandas-dev/pandas/HEAD

@jreback
Copy link
Contributor

jreback commented Aug 6, 2017

It seems that pull request did not make it into pandas 0.20.3, can you rerun your code with pandas

it is marked for 0.21.0 on the milestone.

@jreback jreback closed this as completed Aug 6, 2017
@jreback jreback added the Compat pandas objects compatability with Numpy or Python functions label Aug 6, 2017
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
Projects
None yet
Development

No branches or pull requests

4 participants