Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two rows with same date object throws issue #36

Closed
korymath opened this issue Feb 27, 2017 · 4 comments
Closed

Two rows with same date object throws issue #36

korymath opened this issue Feb 27, 2017 · 4 comments
Assignees

Comments

@korymath
Copy link


TypeError Traceback (most recent call last)
in ()
1 m = Prophet()
----> 2 m.fit(df);

/Users/korymathewson/anaconda2/lib/python2.7/site-packages/fbprophet/forecaster.pyc in fit(self, df)
340
341 self.set_changepoints()
--> 342 A = self.get_changepoint_matrix()
343 changepoint_indexes = self.get_changepoint_indexes()
344

/Users/korymathewson/anaconda2/lib/python2.7/site-packages/fbprophet/forecaster.pyc in get_changepoint_matrix(self)
191
192 def get_changepoint_matrix(self):
--> 193 changepoint_indexes = self.get_changepoint_indexes()
194
195 A = np.zeros((self.history.shape[0], len(changepoint_indexes)))

/Users/korymathewson/anaconda2/lib/python2.7/site-packages/fbprophet/forecaster.pyc in get_changepoint_indexes(self)
184 # the historical data.
185 indexes.append(row_index.get_loc(cp))
--> 186 return np.array(indexes).astype(np.int)
187
188 def get_changepoint_times(self):

TypeError: long() argument must be a string or a number, not 'slice'

@korymath
Copy link
Author

Seems to be happening when there are two rows for a given date

@korymath korymath changed the title Issue running from the getting started guide Two rows with same date object throws issue Feb 27, 2017
@xhesc
Copy link

xhesc commented Feb 27, 2017

Related: #32

@bletham bletham self-assigned this Feb 28, 2017
@bletham
Copy link
Contributor

bletham commented Feb 28, 2017

The latest commit fixes this issue. Could you install from Github and make sure it is working for you?

@Coriou
Copy link

Coriou commented Mar 1, 2017

Hey @bletham, had the same error and installing the latest version from Github did indeed fix this error. Thank you

@korymath korymath closed this as completed Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants