{"action":"created","issue":{"url":"https://api.github.com/repos/sys-bio/roadrunner/issues/258","labels_url":"https://api.github.com/repos/sys-bio/roadrunner/issues/258/labels{/name}","comments_url":"https://api.github.com/repos/sys-bio/roadrunner/issues/258/comments","events_url":"https://api.github.com/repos/sys-bio/roadrunner/issues/258/events","html_url":"https://github.com/sys-bio/roadrunner/issues/258","id":126675999,"number":258,"title":"Return <type 'NamedArray'> instead of <type 'numpy.ndarray'> for most r.model functions","user":{"login":"matthiaskoenig","id":900538,"avatar_url":"https://avatars.githubusercontent.com/u/900538?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiaskoenig","html_url":"https://github.com/matthiaskoenig","followers_url":"https://api.github.com/users/matthiaskoenig/followers","following_url":"https://api.github.com/users/matthiaskoenig/following{/other_user}","gists_url":"https://api.github.com/users/matthiaskoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiaskoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiaskoenig/subscriptions","organizations_url":"https://api.github.com/users/matthiaskoenig/orgs","repos_url":"https://api.github.com/users/matthiaskoenig/repos","events_url":"https://api.github.com/users/matthiaskoenig/events{/privacy}","received_events_url":"https://api.github.com/users/matthiaskoenig/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T15:20:30Z","updated_at":"2016-01-14T15:28:33Z","closed_at":null,"body":"For all numeric arrays which are available from roadrunner these should be returned with the corresponding names/ids, i.e. return the NamedArray instead of the blank numpy.ndarray. Like for instance done with simulationResult.\r\n\r\nCurrently, one always has to lookup the names for arrays/matrices.\r\n\r\nFor instance:\r\n```\r\nvolumes = r.model.getCompartmentVolumes()\r\n# requires subsequent call to\r\nids = r.model.getCompartmentIds()\r\n```\r\nwhich gives the separate information\r\n```\r\n['e', 'c', 'm']\r\n[  1.00000000e-06   1.00000000e-06   1.00000000e+00]\r\n```\r\nJust return a named array which allow the extremely useful access via id\r\n```\r\nvolumes['c']\r\n```\r\nSame for almost all functions in\r\n```\r\nr.model.get*Ids()\r\nr.model.get*Something()\r\n```\r\nThis will make the work with the returned matrices & arrays so much easier."},"comment":{"url":"https://api.github.com/repos/sys-bio/roadrunner/issues/comments/171673681","html_url":"https://github.com/sys-bio/roadrunner/issues/258#issuecomment-171673681","issue_url":"https://api.github.com/repos/sys-bio/roadrunner/issues/258","id":171673681,"user":{"login":"matthiaskoenig","id":900538,"avatar_url":"https://avatars.githubusercontent.com/u/900538?v=3","gravatar_id":"","url":"https://api.github.com/users/matthiaskoenig","html_url":"https://github.com/matthiaskoenig","followers_url":"https://api.github.com/users/matthiaskoenig/followers","following_url":"https://api.github.com/users/matthiaskoenig/following{/other_user}","gists_url":"https://api.github.com/users/matthiaskoenig/gists{/gist_id}","starred_url":"https://api.github.com/users/matthiaskoenig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthiaskoenig/subscriptions","organizations_url":"https://api.github.com/users/matthiaskoenig/orgs","repos_url":"https://api.github.com/users/matthiaskoenig/repos","events_url":"https://api.github.com/users/matthiaskoenig/events{/privacy}","received_events_url":"https://api.github.com/users/matthiaskoenig/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T15:28:33Z","updated_at":"2016-01-14T15:28:33Z","body":"Also applies to things like steadyStateValues which should be packed with r.selections\r\n```\r\nprint(r.selections)\r\nprint(r.getSteadyStateValues())\r\n\r\n['time', 'bA', 'bB', 'bC', 'v1', 'v2', 'v3', 'v4']\r\n[ 0.59225087  1.11869105  3.29028969  1.11869732  3.29028623  0.59225152]\r\n```"}}