{"action":"opened","issue":{"url":"https://api.github.com/repos/dmlc/mxnet/issues/429","labels_url":"https://api.github.com/repos/dmlc/mxnet/issues/429/labels{/name}","comments_url":"https://api.github.com/repos/dmlc/mxnet/issues/429/comments","events_url":"https://api.github.com/repos/dmlc/mxnet/issues/429/events","html_url":"https://github.com/dmlc/mxnet/issues/429","id":114167921,"number":429,"title":"Parameter conversion for calling auto-imported libmxnet APIs","user":{"login":"pluskid","id":3542,"avatar_url":"https://avatars.githubusercontent.com/u/3542?v=3","gravatar_id":"","url":"https://api.github.com/users/pluskid","html_url":"https://github.com/pluskid","followers_url":"https://api.github.com/users/pluskid/followers","following_url":"https://api.github.com/users/pluskid/following{/other_user}","gists_url":"https://api.github.com/users/pluskid/gists{/gist_id}","starred_url":"https://api.github.com/users/pluskid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pluskid/subscriptions","organizations_url":"https://api.github.com/users/pluskid/orgs","repos_url":"https://api.github.com/users/pluskid/repos","events_url":"https://api.github.com/users/pluskid/events{/privacy}","received_events_url":"https://api.github.com/users/pluskid/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dmlc/mxnet/labels/discussion","name":"discussion","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-29T23:25:38Z","updated_at":"2015-10-29T23:25:38Z","closed_at":null,"body":"Similar question arise before when we were talking about row-major vs column-major in C/C++/Python vs. in R/Julia. That means the shape `(2,3,4)` in Julia/R side means the shape `(4,3,2)` in C++ backend. We did not come up with a very satisfactory solution. The current workaround is just to reverse all tuples passed to libmxnet APIs.\r\n\r\nAnother issue, due to the (unfortunate) design of Julia, is that it's array is 1-based. So for example, when calling `choose_element` function on `NDArray`, people should use 0-based indexing instead of 1-based. This could be confusing. Solutions could be\r\n\r\n1. Easiest fix: just document it. Asking people to be careful when calling APIs.\r\n2. Or we could augment the exporting API, to include a little bit more meta data. We could define some type hints for each parameters, like it should be a `Shape` or an `Index`. Then the frontend could do necessary preprocessing automatically."}}