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

nanops on datetime objects failing #487

creeson opened this issue Dec 14, 2011 · 1 comment


Copy link

commented Dec 14, 2011


It looks like apply_along_axis does not play well with objects that have no length? If I go comment out the numpy 1.6.1 workaround in Python 3.x portion, this goes back to working fine.


For example:

import pandas as ps
x = ps.Series([ps.datetime(2011,4,3)])

Traceback (most recent call last):
File "<pyshell#3>", line 1, in
File "C:\Python27\lib\site-packages\pandas\core\", line 722, in min
return nanops.nanmin(self.values, skipna=skipna, copy=True)
File "C:\Python27\lib\site-packages\pandas\core\", line 118, in nanmin
result = np.apply_along_axis(builtin.min, apply_ax, values)
File "C:\Python27\lib\site-packages\numpy\lib\", line 104, in apply_along_axis
outshape[axis] = len(res)
TypeError: object of type 'datetime.datetime' has no len()


This comment has been minimized.

Copy link

commented Dec 15, 2011

OK, this is fixed in master. Probably fails in Python 3 now but, so it goes-- will report the bug upstream to NumPy

@wesm wesm closed this Dec 15, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.