-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Description
Hi,
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.
Thanks!
For example:
import pandas as ps
x = ps.Series([ps.datetime(2011,4,3)])
x.min()
Traceback (most recent call last):
File "<pyshell#3>", line 1, in
x.min()
File "C:\Python27\lib\site-packages\pandas\core\series.py", line 722, in min
return nanops.nanmin(self.values, skipna=skipna, copy=True)
File "C:\Python27\lib\site-packages\pandas\core\nanops.py", line 118, in nanmin
result = np.apply_along_axis(builtin.min, apply_ax, values)
File "C:\Python27\lib\site-packages\numpy\lib\shape_base.py", line 104, in apply_along_axis
outshape[axis] = len(res)
TypeError: object of type 'datetime.datetime' has no len()