Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
datetime Series should raise on most numerical ops #3726
Comments
|
this is fixed for all numerical type ops, eg +, - etc (some make sense some don't) |
|
haha indeed. shouldn't other ufuncs raise though? i think it could be prevented since u know the dtype. maybe not for object arrays. |
|
there's an unconditional conversion to float64 in many ops in nanops.py. while practical for most purposes i think disallowing reduction ops on dates is the way to go. additionally probably good to only allow conversion to float if it's numeric and pass |
|
this is a bit of an API change though, although currently there are no tests for summing over datetime64[ns] series/frames |
|
This is ok for Frames, as they use
|
|
I should have this in by today. Should I start a new section in rls notes and a new what's new doc? You mentioned that there shouldn't be any more than doc prs until 11.1 is pushed |
cpcloud commentedMay 31, 2013
obvs something like
diffis fine, but i think sum/prod and most ufuncs should raise aTypeErrormaybe try the ops on thevaluesattribute and if it doesn't raise continue