{"action":"created","issue":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/902","repository_url":"https://api.github.com/repos/arrayfire/arrayfire","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/902/labels{/name}","comments_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/902/comments","events_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/902/events","html_url":"https://github.com/arrayfire/arrayfire/issues/902","id":94743020,"number":902,"title":"Indexing and Assignment based on co-ordinates","user":{"login":"pavanky","id":364829,"avatar_url":"https://avatars.githubusercontent.com/u/364829?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanky","html_url":"https://github.com/pavanky","followers_url":"https://api.github.com/users/pavanky/followers","following_url":"https://api.github.com/users/pavanky/following{/other_user}","gists_url":"https://api.github.com/users/pavanky/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanky/subscriptions","organizations_url":"https://api.github.com/users/pavanky/orgs","repos_url":"https://api.github.com/users/pavanky/repos","events_url":"https://api.github.com/users/pavanky/events{/privacy}","received_events_url":"https://api.github.com/users/pavanky/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/CPU","name":"CPU","color":"446688"},{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/CUDA","name":"CUDA","color":"117711"},{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/feature","name":"feature","color":"00FF00"},{"url":"https://api.github.com/repos/arrayfire/arrayfire/labels/OpenCL","name":"OpenCL","color":"ff9900"}],"state":"open","locked":false,"assignee":{"login":"pavanky","id":364829,"avatar_url":"https://avatars.githubusercontent.com/u/364829?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanky","html_url":"https://github.com/pavanky","followers_url":"https://api.github.com/users/pavanky/followers","following_url":"https://api.github.com/users/pavanky/following{/other_user}","gists_url":"https://api.github.com/users/pavanky/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanky/subscriptions","organizations_url":"https://api.github.com/users/pavanky/orgs","repos_url":"https://api.github.com/users/pavanky/repos","events_url":"https://api.github.com/users/pavanky/events{/privacy}","received_events_url":"https://api.github.com/users/pavanky/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/arrayfire/arrayfire/milestones/14","html_url":"https://github.com/arrayfire/arrayfire/milestones/3.4.0","labels_url":"https://api.github.com/repos/arrayfire/arrayfire/milestones/14/labels","id":1536888,"number":14,"title":"3.4.0","description":"Sparse Support, Thread Safety, Parallel CPU\r\n","creator":{"login":"shehzan10","id":2288659,"avatar_url":"https://avatars.githubusercontent.com/u/2288659?v=3","gravatar_id":"","url":"https://api.github.com/users/shehzan10","html_url":"https://github.com/shehzan10","followers_url":"https://api.github.com/users/shehzan10/followers","following_url":"https://api.github.com/users/shehzan10/following{/other_user}","gists_url":"https://api.github.com/users/shehzan10/gists{/gist_id}","starred_url":"https://api.github.com/users/shehzan10/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shehzan10/subscriptions","organizations_url":"https://api.github.com/users/shehzan10/orgs","repos_url":"https://api.github.com/users/shehzan10/repos","events_url":"https://api.github.com/users/shehzan10/events{/privacy}","received_events_url":"https://api.github.com/users/shehzan10/received_events","type":"User","site_admin":false},"open_issues":45,"closed_issues":2,"state":"open","created_at":"2016-01-22T21:51:19Z","updated_at":"2016-03-18T00:09:58Z","due_on":"2016-05-16T04:00:00Z","closed_at":null},"comments":6,"created_at":"2015-07-13T15:07:42Z","updated_at":"2016-03-23T14:56:42Z","closed_at":null,"body":"Possible use cases:\r\n\r\nAn array \"A\" is created in a grid layout. You need to get to access a list of points from it based on the co-ordinate arrays \"X\" and \"Y\".\r\n\r\nCurrently doing A(X, Y) will result in an all to all combination of X and Y co-ordinates. Having a function like getValues(A, X, Y) (name can be changed) that does this would be helpful in signal and image processing functions.\r\n\r\nCurrently the only alternative is to do A(Y * A.dims(0) + X). This works but it is ugly and needs unnecessary calculations."},"comment":{"url":"https://api.github.com/repos/arrayfire/arrayfire/issues/comments/200381577","html_url":"https://github.com/arrayfire/arrayfire/issues/902#issuecomment-200381577","issue_url":"https://api.github.com/repos/arrayfire/arrayfire/issues/902","id":200381577,"user":{"login":"pavanky","id":364829,"avatar_url":"https://avatars.githubusercontent.com/u/364829?v=3","gravatar_id":"","url":"https://api.github.com/users/pavanky","html_url":"https://github.com/pavanky","followers_url":"https://api.github.com/users/pavanky/followers","following_url":"https://api.github.com/users/pavanky/following{/other_user}","gists_url":"https://api.github.com/users/pavanky/gists{/gist_id}","starred_url":"https://api.github.com/users/pavanky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pavanky/subscriptions","organizations_url":"https://api.github.com/users/pavanky/orgs","repos_url":"https://api.github.com/users/pavanky/repos","events_url":"https://api.github.com/users/pavanky/events{/privacy}","received_events_url":"https://api.github.com/users/pavanky/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T14:56:42Z","updated_at":"2016-03-23T14:56:42Z","body":"a third option is to do this:\r\n\r\n```\r\na(af::tuple(x, y, z)) = b\r\n```\r\n\r\nIgnore the name, it can be anything we want."}}