Code Sample, a copy-pastable example if possible
#deadlock.py
import pandas as pd
import numpy as np
df = pd.DataFrame(np.random.rand(4,2))
c = []
c.append(c)
c.append(c)
print(df[c])
Problem description
The example above hangs in some C-level function. A quick inspection with perf
shows that it is PyArray_DTypeFromObjectHelper
.
I came across this when debugging a typo (a list was appending itself instead of the element I was interested in).
Expected Output
Some sort of exception.
Output of pd.show_versions()
This is the environment I get when typing conda create -p /tmp/pd pandas numpy=1.13
on linux64.
Comment From: jorisvandenbossche
@Zaharid I suppose this can be closed as it is tracked on the numpy side?
Comment From: Zaharid
Yes. Please do.
On 27 Jun 2017 14:25, "Joris Van den Bossche" notifications@github.com wrote:
@Zaharid https://github.com/zaharid I suppose this can be closed as it is tracked on the numpy side?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pandas-dev/pandas/issues/16778#issuecomment-311342303, or mute the thread https://github.com/notifications/unsubscribe-auth/AFabUgw6FK-myEXYzMvrWvR2fspRgHV-ks5sIPSwgaJpZM4OGX28 .
Comment From: jorisvandenbossche
But thanks for reporting!