{"action":"created","issue":{"url":"https://api.github.com/repos/gsagnol/picos/issues/24","repository_url":"https://api.github.com/repos/gsagnol/picos","labels_url":"https://api.github.com/repos/gsagnol/picos/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/gsagnol/picos/issues/24/comments","events_url":"https://api.github.com/repos/gsagnol/picos/issues/24/events","html_url":"https://github.com/gsagnol/picos/issues/24","id":162319185,"number":24,"title":"Multiplying a matrix with a complex coefficient throws a TypeError","user":{"login":"peterwittek","id":644779,"avatar_url":"https://avatars.githubusercontent.com/u/644779?v=3","gravatar_id":"","url":"https://api.github.com/users/peterwittek","html_url":"https://github.com/peterwittek","followers_url":"https://api.github.com/users/peterwittek/followers","following_url":"https://api.github.com/users/peterwittek/following{/other_user}","gists_url":"https://api.github.com/users/peterwittek/gists{/gist_id}","starred_url":"https://api.github.com/users/peterwittek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/peterwittek/subscriptions","organizations_url":"https://api.github.com/users/peterwittek/orgs","repos_url":"https://api.github.com/users/peterwittek/repos","events_url":"https://api.github.com/users/peterwittek/events{/privacy}","received_events_url":"https://api.github.com/users/peterwittek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-06-26T09:02:27Z","updated_at":"2016-07-11T11:33:38Z","closed_at":null,"body":"This example works:\r\n\r\n```python\r\nimport cvxopt\r\nimport picos\r\nA = cvxopt.matrix([[1.0, -1.0], [2.0, 1.0]])\r\nproblem = picos.Problem()\r\nr = problem.add_variable('r')\r\nproblem.add_constraint(A*r == 0)\r\nproblem.solve()\r\n```\r\n\r\nIf we add a pair of real variables to a model a complex one, it also works:\r\n\r\n```python\r\nproblem = picos.Problem()\r\nr = problem.add_variable('r')\r\ni = problem.add_variable('i')\r\nproblem.add_constraint(A*r + A*1j*i == 0)\r\nproblem.solve()\r\n```\r\n\r\nA single complex variable, however, throws `TypeError: invalid type in assignment`:\r\n\r\n```python\r\nproblem = picos.Problem()\r\nc = problem.add_variable('c', vtype='complex')\r\nproblem.add_constraint(A*c == 0)\r\nproblem.solve()\r\n```\r\n\r\nI tried in both Python 2 and 3, yielding the same outcome."},"comment":{"url":"https://api.github.com/repos/gsagnol/picos/issues/comments/231709969","html_url":"https://github.com/gsagnol/picos/issues/24#issuecomment-231709969","issue_url":"https://api.github.com/repos/gsagnol/picos/issues/24","id":231709969,"user":{"login":"gsagnol","id":8492578,"avatar_url":"https://avatars.githubusercontent.com/u/8492578?v=3","gravatar_id":"","url":"https://api.github.com/users/gsagnol","html_url":"https://github.com/gsagnol","followers_url":"https://api.github.com/users/gsagnol/followers","following_url":"https://api.github.com/users/gsagnol/following{/other_user}","gists_url":"https://api.github.com/users/gsagnol/gists{/gist_id}","starred_url":"https://api.github.com/users/gsagnol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsagnol/subscriptions","organizations_url":"https://api.github.com/users/gsagnol/orgs","repos_url":"https://api.github.com/users/gsagnol/repos","events_url":"https://api.github.com/users/gsagnol/events{/privacy}","received_events_url":"https://api.github.com/users/gsagnol/received_events","type":"User","site_admin":false},"created_at":"2016-07-11T11:33:38Z","updated_at":"2016-07-11T11:33:38Z","body":"ok, i get it. I'll have a look at it ASAP"}}
{"actor":{"display_login":"gsagnol"}}