Reopened: "TypeError: searchsorted requires compatible dtype or scalar, not ndarray "
"TypeError: searchsorted requires compatible dtype or scalar, not Series"
appears again when applying timeindex data:

``` 
#sample data
data = ['1998-01-07 13:17:00', '1998-01-07 13:18:00', '1998-01-07 13:19:00', '1998-01-07 13:20:00',
     '1998-01-07 13:21:00', '1998-01-07 13:22:00', '1998-01-07 13:23:00']
df = pd.DataFrame(x)
df.set_index(df.iloc[:, 0], inplace=True)
df.index = pd.DatetimeIndex(df.index.values) 
 
# this is the line
df.index.searchsorted(pd.Series(np.array([df.index[0], df.index.max()]))) 
  
```
How to solve this?