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

np.max(Index) creates an invalid index. #5349

Closed
OlexiyO opened this issue Oct 27, 2013 · 1 comment
Closed

np.max(Index) creates an invalid index. #5349

OlexiyO opened this issue Oct 27, 2013 · 1 comment

Comments

@OlexiyO
Copy link

OlexiyO commented Oct 27, 2013

Pandas version: '0.12.0'
Numpy version: '1.6.1'

How to reproduce:
ser = pd.Series([2, 4, 6], index=[0, 2, 3])
ids = ser.index
x = np.max(ids)

Now, two things happen:
*) type(x) is Index
*) x is a 0-d array (so getting x[0]) crashes
*) print x crashes as well:

/home/olexiy/clients/olexiy-validators/google3/blaze-bin/quality/ranklab/main/tools/iranklab.runfiles/google3/third_party/py/pandas/core/common.py in pprint_thing(thing, _nest_lvl, escape_chars, default_escapes, quote_strings)
2065 result = fmt % as_escaped_unicode(thing)
2066 else:
-> 2067 result = as_escaped_unicode(thing)
2068
2069 return unicode(result) # always unicode

/home/olexiy/clients/olexiy-validators/google3/blaze-bin/quality/ranklab/main/tools/iranklab.runfiles/google3/third_party/py/pandas/core/common.py in as_escaped_unicode(thing, escape_chars)
2026
2027 try:
-> 2028 result = unicode(thing) # we should try this first
2029 except UnicodeDecodeError:
2030 # either utf-8 or we replace errors

RuntimeError: maximum recursion depth exceeded while calling a Python object

@jreback
Copy link
Contributor

jreback commented Oct 27, 2013

thanks this is already reported in #4551 and will be addressed in a future release

@jreback jreback closed this as completed Oct 27, 2013
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

2 participants