How to round datetime64 values
rounded = numpy.array(myarray, dtype='datetime64[s]')
or
rounded = myarray.astype('datetime64[s]')
This also works for minutes by using:
rounded = numpy.array(myarray, dtype='datetime64[m]')
rounded = numpy.array(myarray, dtype='datetime64[s]')
or
rounded = myarray.astype('datetime64[s]')
This also works for minutes by using:
rounded = numpy.array(myarray, dtype='datetime64[m]')