Motivation behind numpy's datetime64 type?

Viewed 405

I noticed recently that numpy includes a datetime64 data type beginning in numpy 1.7:

http://www.compsci.wm.edu/SciClone/documentation/software/math/NumPy/html1.7/reference/arrays.datetime.html

I am wondering what is the motivation behind including this as a separate type within the numpy package rather than using the builtin datetime.datetime provided by Python?

Some of the reasons I am interested in understanding this better include:

  1. I want to know when it is appropriate to use datetime.datetime vs when to use numpy.datetime64
  2. Since numpy includes no date type analogous to datetime.date, should I use numpy.datetime64 for dates when I need to interact with numpy.datetime64 objects? Or should I intermingle datetime.date and numpy.datetime64 in my code?
2 Answers
Related