Skip to content
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

endless recursion using MetaPandasObject and MetaDataFrame #189

Open
Geekly opened this issue Aug 23, 2017 · 0 comments
Open

endless recursion using MetaPandasObject and MetaDataFrame #189

Geekly opened this issue Aug 23, 2017 · 0 comments

Comments

@Geekly
Copy link

Geekly commented Aug 23, 2017

This may not be relevant for python 2.7, so ignore if appropriate. The issue I'm seeing is with the metadframe.py module. Trying to run the module stand-alone, I see a recursion error while executing the example code under the

if __name__ == "__main__":
    meta_df = MetaDataFrame(abs(randn(3, 3)), index=['A', 'B', 'C'], columns=['c11', 'c22', 'c33'])`
    new = meta_df * 50.0`

Here's the error (part of it):

Traceback (most recent call last):
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 395, in
new = meta_df * 50.0
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 206, in mul
return self._transfer(self._frame.mul(x))
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/copy.py", line 161, in deepcopy
y = copier(memo)
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 177, in _framegetattr
dfout = self._transfer(out)
------------Many repeated lines of recursion here---------------
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 177, in _framegetattr
dfout = self._transfer(out)
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 140, in _transfer
self) # This looks like None, but is it type (MetaPandasObject, just union prints None
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/copy.py", line 161, in deepcopy
y = copier(memo)
File "/Users/XXXXX/Projects/pybcm_proj/pybcm/metadframe.py", line 173, in _framegetattr
out = getattr(self._frame, attr)(*fcnargs, **fcnkwargs)
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/generic.py", line 3441, in deepcopy
return self.copy(deep=True)
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/generic.py", line 3432, in copy
data = self._data.copy(deep=deep)
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/internals.py", line 3432, in copy
new_axes = [copy(ax) for ax in self.axes]
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/internals.py", line 3432, in
new_axes = [copy(ax) for ax in self.axes]
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/internals.py", line 3431, in
copy = lambda ax: ax.view()
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 712, in view
result = self._shallow_copy()
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 410, in _shallow_copy
return self._simple_new(values, **attributes)
File "/Users/XXXXX/virtualenvs/pybcm/lib/python3.6/site-packages/pandas/core/indexes/base.py", line 387, in _simple_new
for k, v in compat.iteritems(kwargs):
RecursionError: maximum recursion depth exceeded

Any ideas how I can address this in py 3.6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant