Issue 1:
pandas version: 0.8.2.dev-742d7fb

import pandas
import pandas.util.testing as put
index = put.makeDateIndex(4)
index.isin(index) # returns array([False, False, False, False], dtype=bool)

It works fine with pandas 0.7.3, i.e. it returns an array of True instead. This works fine as well with a pandas.Int64Index. index.isin(index) just calls pandas.lib.ismember(index._array_values(), set(index)) but I am afraid I lack the skills to understand what goes wrong in the cython code.

Just for some background, the original problem I bumped into:

import numpy as np
import pandas
ts = pandas.TimeSeries(data=[1,2,3], index=[ np.datetime64(x) for x in ['2000', '2000', '2002'] ])
ts.ix[ts.index] # returns an empty timeseries whereas ts[ts.index] works fine

I tracked it down to ts.ix._get_item_iterable which has a special case for when the index has duplicates which use pandas.TimeSeries.isin.

As an aside it looks like pandas.core.common._asarray_tuplesafe(index) is wrong when using numpy 1.6 so that ts.ix[ts.index] still would return an empty array if this bug was fixed, but I guess that's a numpy 1.6 datetime64 bug which I have seen mentioned in a few other places.

Issue 2:
When assigning a timedelta64 array to a subset of a new column of a DataFrame, missing data is not filled with NaT as expected; rather, the new column is cast to float64 and NaN is used instead. This cast does not usually occur when all values are present, except when there are already float64 columns but no timedelta64 columns in the DataFrame and indexing is done through .ix or .loc.

It's possible these should be two separate issues.

There are a lot of issues involving NaT in the issue tracker; I'm not 100% sure that this isn't a duplicate. (Nor am I 100% sure this isn't intended behavior, but if it is I'd expect it to be documented more prominently.)

import numpy as np
import pandas as pd

one_hour = 60*60*10**9

temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
temp['A'] = np.array([1*one_hour]*4, dtype='m8[ns]')
temp.loc[:,'B'] = np.array([2*one_hour]*4, dtype='m8[ns]')
temp.loc[:3,'C'] = np.array([3*one_hour]*3, dtype='m8[ns]')
temp.ix[:,'D'] = np.array([4*one_hour]*4, dtype='m8[ns]')
temp.ix[:3,'E'] = np.array([5*one_hour]*3, dtype='m8[ns]')
temp['F'] = np.timedelta64('NaT')
temp.ix[:-1,'F'] = np.array([6*one_hour]*3, dtype='m8[ns]')

temp
# A B C D E F
#2014-01-01 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-02 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-03 01:00:00 02:00:00 1.080000e+13 04:00:00 1.800000e+13 06:00:00
#2014-01-04 01:00:00 02:00:00 NaN 04:00:00 NaN NaT
#
# [4 rows x 6 columns]

temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
# Partial assignment converts
temp.ix[:-1,'A'] = np.array([1*one_hour]*3, dtype='m8[ns]')
# DataFrame is all floats; converts
temp.ix[:,'B'] = np.array([2*one_hour]*4, dtype='m8[ns]')
# .ix and .loc behave the same
temp.loc[:,'C'] = np.array([3*one_hour]*4, dtype='m8[ns]')
# straight column assignment doesn't convert
temp['D'] = np.array([4*one_hour]*4, dtype='m8[ns]')
# Now there are timedeltas; doesn't convert
temp.ix[:,'E'] = np.array([5*one_hour]*4, dtype='m8[ns]')
# .ix and .loc still behave the same
temp.loc[:,'F'] = np.array([6*one_hour]*4, dtype='m8[ns]')

temp
# A B C D E \
#2014-01-01 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-02 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-03 3.600000e+12 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#2014-01-04 NaN 7.200000e+12 1.080000e+13 04:00:00 05:00:00
#
# F
#2014-01-01 06:00:00
#2014-01-02 06:00:00
#2014-01-03 06:00:00
#2014-01-04 06:00:00
#
# [4 rows x 6 columns]

temp = pd.DataFrame({}, index=pd.date_range('2014-1-1', periods=4))
# No columns yet, no conversion
temp.ix[:,'A'] = np.array([2*one_hour]*4, dtype='m8[ns]')
# A
#2014-01-01 02:00:00
#2014-01-02 02:00:00
#2014-01-03 02:00:00
#2014-01-04 02:00:00
#
# [4 rows x 1 columns]