On Mon, Dec 10, 2012 at 6:43 PM, <
josef...@gmail.com> wrote:
> On Mon, Dec 10, 2012 at 5:56 PM, <
josef...@gmail.com> wrote:
>> On Mon, Dec 10, 2012 at 5:34 PM, Tom Augspurger
>> <
tom.augs...@gmail.com> wrote:
>>> Internet went out here (this is on my phone) so I'll post more later.
>>>
>>> Basically I've reproduced the crash when using pandas date_range and datetimeIndex objects as exogenous variables in OLS. The crash occurs doesn't occur when I call .fit() but does when I do something with the results, like print them.
>>
>> I have it now also on Windows in a virtualenv with numpy 1.6.2 and
>> pandas.__version__ = '0.9.0'
>>
>>>>> res.model.exog.dtype
>> dtype('datetime64[ns]')
>>>>> res._results.params
>> array([ 7.28078437e-17])
>>
>> res.params raises exception
>>
>> accessing fittedvalues segfaults
>
> numpy bug in 1.6.
>>>> np.dot(res.model.exog, [1.]).shape
>
> segfaults
> dot doesn't seem to like dtype('datetime64[ns]')
just another check: pandas is also not to blame
>>> sp500.index[:10]
<class 'pandas.tseries.index.DatetimeIndex'>
[2003-09-29 00:00:00, ..., 2003-10-10 00:00:00]
Length: 10, Freq: None, Timezone: None
>>> a = np.asarray(sp500.index)
>>> a[:10]
array([1970-01-13 96:00:00, 1970-01-13 120:00:00, 1970-01-13 144:00:00,
1970-01-13 168:00:00, 1970-01-13 192:00:00, 1970-01-13 08:00:00,
1970-01-13 32:00:00, 1970-01-13 56:00:00, 1970-01-13 80:00:00,
1970-01-13 104:00:00], dtype=datetime64[ns])
>>> np.dot(a, [1])
<booom>
Josef