{"action":"opened","issue":{"url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/507","repository_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines","labels_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/507/labels{/name}","comments_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/507/comments","events_url":"https://api.github.com/repos/CamDavidsonPilon/lifelines/issues/507/events","html_url":"https://github.com/CamDavidsonPilon/lifelines/issues/507","id":352523052,"node_id":"MDU6SXNzdWUzNTI1MjMwNTI=","number":507,"title":"Overflow encountered in long_scalars","user":{"login":"mcbuch","id":22355903,"node_id":"MDQ6VXNlcjIyMzU1OTAz","avatar_url":"https://avatars1.githubusercontent.com/u/22355903?v=4","gravatar_id":"","url":"https://api.github.com/users/mcbuch","html_url":"https://github.com/mcbuch","followers_url":"https://api.github.com/users/mcbuch/followers","following_url":"https://api.github.com/users/mcbuch/following{/other_user}","gists_url":"https://api.github.com/users/mcbuch/gists{/gist_id}","starred_url":"https://api.github.com/users/mcbuch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcbuch/subscriptions","organizations_url":"https://api.github.com/users/mcbuch/orgs","repos_url":"https://api.github.com/users/mcbuch/repos","events_url":"https://api.github.com/users/mcbuch/events{/privacy}","received_events_url":"https://api.github.com/users/mcbuch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-21T12:48:04Z","updated_at":"2018-08-21T12:48:04Z","closed_at":null,"author_association":"NONE","body":"I've been trying to fit a CoxPHFitter on a dataset of 100.000 observations and about 15 variables (including the event- and duration columns), but I get the following warning:\r\n\r\n```\r\nC:\\Anaconda\\lib\\site-packages\\lifelines\\utils\\__init__.py:948: RuntimeWarning: overflow encountered in long_scalars\r\nnum_tied += tied\r\n```\r\n\r\n\r\nI've tried removing columns one by one to check for data inconsistencies, and also different transformations of variables (rounding floats, float to integer, checking for characters in numeric columns) to no avail. The samples are selected at random from a larger set of observations. \r\n\r\nWhat does work is reducing the number of observations to 78.000 (78.500 fails). After delving into the overflow issue, for example [here](https://stackoverflow.com/questions/7559595/python-runtimewarning-overflow-encountered-in-long-scalars), it seems that the num_tied is of dtype int32, and the warning is raised when the number excedes 2147483647. The fix could/should be to declare the variable like this:\r\n\r\n`    num_tied = np.int64(0)`\r\n\r\nSomething to considere in a future update?"}}
{"actor":{"display_login":"mcbuch"}}