You'll want to strip your datetime64 of time information before comparison by specifying the 'datetime64[D]' data type, like this:
>>> a = numpy.datetime64('2011-01-10')
>>> b = numpy.datetime64('2011-01-10T09:00:00.000000-0700')
>>> a == b
False
>>> a.astype('datetime64[D]') == b.astype('datetime64[D]')
True
I couldn't get numpy to create an array of datetime64[D]
values from the string you gave for b
above, by the way. I got this error:
>>> b = numpy.array(['2011-01-10T09:00:00.000000-0700'], dtype='datetime64[D]')
TypeError: Cannot parse "2011-01-10T09:00:00.000000-0700" as unit 'D' using casting rule 'same_kind'