{"action":"created","issue":{"url":"https://api.github.com/repos/pgmpy/pgmpy/issues/600","labels_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/600/labels{/name}","comments_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/600/comments","events_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/600/events","html_url":"https://github.com/pgmpy/pgmpy/issues/600","id":128334985,"number":600,"title":"marginalize","user":{"login":"RansomPaycheque","id":13298838,"avatar_url":"https://avatars.githubusercontent.com/u/13298838?v=3","gravatar_id":"","url":"https://api.github.com/users/RansomPaycheque","html_url":"https://github.com/RansomPaycheque","followers_url":"https://api.github.com/users/RansomPaycheque/followers","following_url":"https://api.github.com/users/RansomPaycheque/following{/other_user}","gists_url":"https://api.github.com/users/RansomPaycheque/gists{/gist_id}","starred_url":"https://api.github.com/users/RansomPaycheque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RansomPaycheque/subscriptions","organizations_url":"https://api.github.com/users/RansomPaycheque/orgs","repos_url":"https://api.github.com/users/RansomPaycheque/repos","events_url":"https://api.github.com/users/RansomPaycheque/events{/privacy}","received_events_url":"https://api.github.com/users/RansomPaycheque/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-23T15:46:10Z","updated_at":"2016-01-23T18:13:08Z","closed_at":null,"body":"Greetings,\r\n\r\nrunning on Yosemite, python 3.4, pgmpy installed (I believe) correctly.\r\n\r\nI am trying to follow the examples from mastering PGM's book. upon doing the following:\r\n\r\nphi = Factor(['A','B'],[2,2],[1000,1,5,100])\r\nphi.marginalize('A', inplace=False)\r\n\r\nI get:\r\n\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"/Users/skalonaris/anaconda/envs/pgmpy-env/lib/python3.4/site-packages/pgmpy-0.1.0-py3.4.egg/pgmpy/factors/Factor.py\", line 209, in marginalize\r\n  File \"/Users/skalonaris/anaconda/envs/pgmpy-env/lib/python3.4/site-packages/pgmpy-0.1.0-py3.4.egg/pgmpy/factors/Factor.py\", line 416, in _index_for_assignment\r\nIndexError: axis 1 out of bounds [0, 1)\r\n\r\nany ideas what the issue is?\r\n\r\nMany thanks,\r\n\r\nRP"},"comment":{"url":"https://api.github.com/repos/pgmpy/pgmpy/issues/comments/174209587","html_url":"https://github.com/pgmpy/pgmpy/issues/600#issuecomment-174209587","issue_url":"https://api.github.com/repos/pgmpy/pgmpy/issues/600","id":174209587,"user":{"login":"RansomPaycheque","id":13298838,"avatar_url":"https://avatars.githubusercontent.com/u/13298838?v=3","gravatar_id":"","url":"https://api.github.com/users/RansomPaycheque","html_url":"https://github.com/RansomPaycheque","followers_url":"https://api.github.com/users/RansomPaycheque/followers","following_url":"https://api.github.com/users/RansomPaycheque/following{/other_user}","gists_url":"https://api.github.com/users/RansomPaycheque/gists{/gist_id}","starred_url":"https://api.github.com/users/RansomPaycheque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RansomPaycheque/subscriptions","organizations_url":"https://api.github.com/users/RansomPaycheque/orgs","repos_url":"https://api.github.com/users/RansomPaycheque/repos","events_url":"https://api.github.com/users/RansomPaycheque/events{/privacy}","received_events_url":"https://api.github.com/users/RansomPaycheque/received_events","type":"User","site_admin":false},"created_at":"2016-01-23T18:13:08Z","updated_at":"2016-01-23T18:13:08Z","body":"I appreciate your reply, but I don't know what I am supposed to do. If I do phi.scope(), it correctly outputs 'A' , 'B'.  Earlier examples in the book also work fine (TabularCPD etc)"}}