{"action":"created","issue":{"url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/371","labels_url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/371/labels{/name}","comments_url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/371/comments","events_url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/371/events","html_url":"https://github.com/Unidata/netcdf4-python/issues/371","id":60893415,"number":371,"title":"Ellipsis object fails when expanded to zero axes.","user":{"login":"jjhelmus","id":1050278,"avatar_url":"https://avatars.githubusercontent.com/u/1050278?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-12T20:22:21Z","updated_at":"2015-03-12T21:33:40Z","closed_at":null,"body":"The following snippet works to set netCDF variable bar to [1, 2, 3, 4, 5] using netcdf4-python version 1.1.1 but raises an IndexError in version 1.1.6:\r\n\r\n``` Python\r\nimport netCDF4\r\ndataset = netCDF4.Dataset('foo.nc', 'w')\r\ndataset.createDimension('dim', 5)\r\nvar = dataset.createVariable('bar', 'i8', ('dim', ))\r\nvar[..., :] = [1, 2, 3, 4, 5]\r\n```\r\n\r\nTraceback is as follows with version 1.1.6:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"bug.py\", line 5, in <module>\r\n    var[..., :] = [1, 2, 3, 4, 5]\r\n  File \"netCDF4.pyx\", line 3319, in netCDF4.Variable.__setitem__ (netCDF4.c:46343)\r\n  File \"/home/jhelmus/anaconda/lib/python2.7/site-packages/netCDF4_utils.py\", line 179, in _StartCountStride\r\n    dimname = dimensions[i]\r\nIndexError: tuple index out of range\r\n```\r\n\r\nIn NumPy, Ellipsis objects (...) are expanded to the number of **:** object to complete the selection tuple.  "},"comment":{"url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/comments/78629269","html_url":"https://github.com/Unidata/netcdf4-python/issues/371#issuecomment-78629269","issue_url":"https://api.github.com/repos/Unidata/netcdf4-python/issues/371","id":78629269,"user":{"login":"jjhelmus","id":1050278,"avatar_url":"https://avatars.githubusercontent.com/u/1050278?v=3","gravatar_id":"","url":"https://api.github.com/users/jjhelmus","html_url":"https://github.com/jjhelmus","followers_url":"https://api.github.com/users/jjhelmus/followers","following_url":"https://api.github.com/users/jjhelmus/following{/other_user}","gists_url":"https://api.github.com/users/jjhelmus/gists{/gist_id}","starred_url":"https://api.github.com/users/jjhelmus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjhelmus/subscriptions","organizations_url":"https://api.github.com/users/jjhelmus/orgs","repos_url":"https://api.github.com/users/jjhelmus/repos","events_url":"https://api.github.com/users/jjhelmus/events{/privacy}","received_events_url":"https://api.github.com/users/jjhelmus/received_events","type":"User","site_admin":false},"created_at":"2015-03-12T21:33:40Z","updated_at":"2015-03-12T21:33:40Z","body":"bisected to 34e3e82230251ed6e570044853bb159c778118b7"}}