I have a numpy array 'date1' of size 100 which stores dates like:
>>> date1[0]
datetime.datetime(2011, 1, 2, 0, 0)
date1 index 1 through 99 I haven't shown but have other dates stored in them.
But I get the following:
z1 = list(set(date1))
>>> z1[0]
datetime.datetime(2011, 5, 7, 0, 0)
Why does the set operation mess up the order of values stored in the original array? How can I make sure that set saves the values in the same order as it is present in the original array.