Issue while using diag tools
I have received below issue when using diagnostic tools. Wanted to share:

~\AppData\Local\Continuum\anaconda3\envs\data\lib\site-packages\pandas\core\internals.py in apply(self, f, axes, filter, do_integrity_check, consolidate, **kwargs) 3054 3055 kwargs['mgr'] = self -> 3056 applied = getattr(b, f)(**kwargs) 3057 result_blocks = _extend_blocks(applied, result_blocks) 3058
~\AppData\Local\Continuum\anaconda3\envs\data\lib\site-packages\pandas\core\internals.py in astype(self, dtype, copy, raise_on_error, values, **kwargs) 459 **kwargs): 460 return self._astype(dtype, copy=copy, raise_on_error=raise_on_error, --> 461 values=values, **kwargs) 462 463 def _astype(self, dtype, copy=False, raise_on_error=True, values=None,
~\AppData\Local\Continuum\anaconda3\envs\data\lib\site-packages\pandas\core\internals.py in _astype(self, dtype, copy, raise_on_error, values, klass, mgr, **kwargs) 502 503 # _astype_nansafe works fine with 1-d only --> 504 values = _astype_nansafe(values.ravel(), dtype, copy=True) 505 values = values.reshape(self.shape) 506
~\AppData\Local\Continuum\anaconda3\envs\data\lib\site-packages\pandas\types\cast.py in _astype_nansafe(arr, dtype, copy) 522 523 raise TypeError("cannot astype a timedelta from [%s] to [%s]" % --> 524 (arr.dtype, dtype)) 525 526 return arr.astype(_TD_DTYPE)
TypeError: cannot astype a timedelta from [timedelta64[ns]] to [int32]
Thanks for raising this, what version of pandas are you using?
import pandas
pandas.__version__
Would it also be possible to paste the code you ran to get this error so that I can replicate it?
And also what version of numpy? (There have been some recent bugs in pandas/numpy interactions for datetimes):
import numpy
numpy.__version__
Pandas 0.19.2 Numpy 1.12.0
Ah, it is probably the pandas 0.19.2 then, this looks similar to the pandas bug in #256 that wasn't fixed until 0.20.1. I set a pandas requirement of 0.20.1 in v0.3.
Actually even with those versions of pandas and numpy I'm not able to replicate this issue on the documentation example (https://github.com/facebook/prophet/blob/v0.3/notebooks/diagnostics.ipynb). Could you possibly share the data csv / model code that you used when you ran into this so I can reproduce it?
I'm hoping this is resolved with the upgrade in pandas version, but if you are still able to produce this please post a reproducing example and re-open.