{"action":"opened","issue":{"url":"https://api.github.com/repos/jeanluct/braidlab/issues/119","labels_url":"https://api.github.com/repos/jeanluct/braidlab/issues/119/labels{/name}","comments_url":"https://api.github.com/repos/jeanluct/braidlab/issues/119/comments","events_url":"https://api.github.com/repos/jeanluct/braidlab/issues/119/events","html_url":"https://github.com/jeanluct/braidlab/issues/119","id":54830001,"number":119,"title":"Special values as generator indices can cause zero generators","user":{"login":"mbudisic","id":748221,"avatar_url":"https://avatars.githubusercontent.com/u/748221?v=3","gravatar_id":"","url":"https://api.github.com/users/mbudisic","html_url":"https://github.com/mbudisic","followers_url":"https://api.github.com/users/mbudisic/followers","following_url":"https://api.github.com/users/mbudisic/following{/other_user}","gists_url":"https://api.github.com/users/mbudisic/gists{/gist_id}","starred_url":"https://api.github.com/users/mbudisic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbudisic/subscriptions","organizations_url":"https://api.github.com/users/mbudisic/orgs","repos_url":"https://api.github.com/users/mbudisic/repos","events_url":"https://api.github.com/users/mbudisic/events{/privacy}","received_events_url":"https://api.github.com/users/mbudisic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-20T00:40:38Z","updated_at":"2015-01-20T00:40:38Z","closed_at":null,"body":"Even though we disallowed \"0\" as input to braid, zero generators can still apparently be created.\r\n\r\nAlso ```inf``` can safely be passed to braid as well. We should consider disallowing special values as well or, alternatively, skipping them without error. For debugging purposes, I think it would be better if NaN and Inf were treated as errors in input.\r\n\r\nCurrently the situation looks like this:\r\n```\r\n>> braidlab.braid([1, nan, 2])\r\nans = \r\n < 1  0  2 >\r\n>> braidlab.braid([1, inf, 2])\r\nans = \r\n < 1  2147483647           2 >\r\n>> braidlab.braid([1, -inf, 2])\r\nans = \r\n < 1 -2147483648           2 >\r\n>> braidlab.braid([1, -nan, 2])\r\nans = \r\n < 1  0  2 >\r\n```"}}