{"action":"created","comment":{"url":"https://api.github.com/repos/SciTools/iris/pulls/comments/146236362","pull_request_review_id":71147646,"id":146236362,"diff_hunk":"@@ -1677,13 +1677,15 @@ def _new_points_requirements(self, points):\n         if points.size > 1 and not iris.util.monotonic(points, strict=True):\n             raise ValueError('The points array must be strictly monotonic.')\n \n+    def _points_getter(self):\n+        return super(DimCoord, self)._points_getter().view()","path":"lib/iris/coords.py","position":28,"original_position":28,"commit_id":"eb7f2f8960f59971844f2e716f37a73d05d89278","original_commit_id":"eb7f2f8960f59971844f2e716f37a73d05d89278","user":{"login":"djkirkham","id":16189532,"avatar_url":"https://avatars0.githubusercontent.com/u/16189532?v=4","gravatar_id":"","url":"https://api.github.com/users/djkirkham","html_url":"https://github.com/djkirkham","followers_url":"https://api.github.com/users/djkirkham/followers","following_url":"https://api.github.com/users/djkirkham/following{/other_user}","gists_url":"https://api.github.com/users/djkirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/djkirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djkirkham/subscriptions","organizations_url":"https://api.github.com/users/djkirkham/orgs","repos_url":"https://api.github.com/users/djkirkham/repos","events_url":"https://api.github.com/users/djkirkham/events{/privacy}","received_events_url":"https://api.github.com/users/djkirkham/received_events","type":"User","site_admin":false},"body":"Makes sense. I'll change it.","created_at":"2017-10-23T11:29:02Z","updated_at":"2017-10-23T11:29:02Z","html_url":"https://github.com/SciTools/iris/pull/2812#discussion_r146236362","pull_request_url":"https://api.github.com/repos/SciTools/iris/pulls/2812","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/SciTools/iris/pulls/comments/146236362"},"html":{"href":"https://github.com/SciTools/iris/pull/2812#discussion_r146236362"},"pull_request":{"href":"https://api.github.com/repos/SciTools/iris/pulls/2812"}},"in_reply_to_id":146229233},"pull_request":{"url":"https://api.github.com/repos/SciTools/iris/pulls/2812","id":147275246,"html_url":"https://github.com/SciTools/iris/pull/2812","diff_url":"https://github.com/SciTools/iris/pull/2812.diff","patch_url":"https://github.com/SciTools/iris/pull/2812.patch","issue_url":"https://api.github.com/repos/SciTools/iris/issues/2812","number":2812,"state":"open","locked":false,"title":"Restore readonly DimCoords","user":{"login":"djkirkham","id":16189532,"avatar_url":"https://avatars0.githubusercontent.com/u/16189532?v=4","gravatar_id":"","url":"https://api.github.com/users/djkirkham","html_url":"https://github.com/djkirkham","followers_url":"https://api.github.com/users/djkirkham/followers","following_url":"https://api.github.com/users/djkirkham/following{/other_user}","gists_url":"https://api.github.com/users/djkirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/djkirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djkirkham/subscriptions","organizations_url":"https://api.github.com/users/djkirkham/orgs","repos_url":"https://api.github.com/users/djkirkham/repos","events_url":"https://api.github.com/users/djkirkham/events{/privacy}","received_events_url":"https://api.github.com/users/djkirkham/received_events","type":"User","site_admin":false},"body":"Historically it's always been the case that the points and bounds arrays of a DimCoord haven't been modifiable from outside the class. Recently this has slipped.\r\n\r\nThere are two changes in this PR. ~One I consider an obvious bug: when converting the argument to the points/bounds setter to a numpy array, a flag is created which determines whether to make a copy. Currently this flag is set if the input is lazy, but this is the wrong way around. If the input argument is already a numpy array, the points will be modifiable via the original array passed in. Conversely, if a lazy array is passed in then we can safely use the array returned by `as_concrete_data` as the actual points array, since there's no way a user could have a reference to it.~ Edit: I've realised that even if the input array is lazy we need to copy the result of `as_concrete_data`, since it could simply be a dask wrapper around a NumPy array to which the user has access.\r\n\r\nThe other change might be considered more controversial. Although the points array returned by the points/bounds array is read-only, it is not a view. This means it's possible for a user to change metadata like dtype and shape. I've changed it so that the getter always returns a view.","created_at":"2017-10-18T11:31:04Z","updated_at":"2017-10-23T11:29:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"94f1c069aaac376beb4fe0ddbc99d6874fb4c30d","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/SciTools/iris/milestones/11","html_url":"https://github.com/SciTools/iris/milestone/11","labels_url":"https://api.github.com/repos/SciTools/iris/milestones/11/labels","id":1037969,"number":11,"title":"v2.0.0","description":"Target release candidate date: 2017/10/27;\r\n\r\n\r\nTarget release date: 2017/11/15;\r\n\r\n\r\nRelease manager: @pelson;\r\n\r\n\r\nPlease don't add further items to this milestone without agreement from the release manager.","creator":{"login":"bjlittle","id":2051656,"avatar_url":"https://avatars2.githubusercontent.com/u/2051656?v=4","gravatar_id":"","url":"https://api.github.com/users/bjlittle","html_url":"https://github.com/bjlittle","followers_url":"https://api.github.com/users/bjlittle/followers","following_url":"https://api.github.com/users/bjlittle/following{/other_user}","gists_url":"https://api.github.com/users/bjlittle/gists{/gist_id}","starred_url":"https://api.github.com/users/bjlittle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjlittle/subscriptions","organizations_url":"https://api.github.com/users/bjlittle/orgs","repos_url":"https://api.github.com/users/bjlittle/repos","events_url":"https://api.github.com/users/bjlittle/events{/privacy}","received_events_url":"https://api.github.com/users/bjlittle/received_events","type":"User","site_admin":false},"open_issues":27,"closed_issues":244,"state":"open","created_at":"2015-03-25T11:13:42Z","updated_at":"2017-10-23T10:32:45Z","due_on":"2017-11-15T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/SciTools/iris/pulls/2812/commits","review_comments_url":"https://api.github.com/repos/SciTools/iris/pulls/2812/comments","review_comment_url":"https://api.github.com/repos/SciTools/iris/pulls/comments{/number}","comments_url":"https://api.github.com/repos/SciTools/iris/issues/2812/comments","statuses_url":"https://api.github.com/repos/SciTools/iris/statuses/eb7f2f8960f59971844f2e716f37a73d05d89278","head":{"label":"djkirkham:readonly_dimcoord","ref":"readonly_dimcoord","sha":"eb7f2f8960f59971844f2e716f37a73d05d89278","user":{"login":"djkirkham","id":16189532,"avatar_url":"https://avatars0.githubusercontent.com/u/16189532?v=4","gravatar_id":"","url":"https://api.github.com/users/djkirkham","html_url":"https://github.com/djkirkham","followers_url":"https://api.github.com/users/djkirkham/followers","following_url":"https://api.github.com/users/djkirkham/following{/other_user}","gists_url":"https://api.github.com/users/djkirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/djkirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djkirkham/subscriptions","organizations_url":"https://api.github.com/users/djkirkham/orgs","repos_url":"https://api.github.com/users/djkirkham/repos","events_url":"https://api.github.com/users/djkirkham/events{/privacy}","received_events_url":"https://api.github.com/users/djkirkham/received_events","type":"User","site_admin":false},"repo":{"id":50017360,"name":"iris","full_name":"djkirkham/iris","owner":{"login":"djkirkham","id":16189532,"avatar_url":"https://avatars0.githubusercontent.com/u/16189532?v=4","gravatar_id":"","url":"https://api.github.com/users/djkirkham","html_url":"https://github.com/djkirkham","followers_url":"https://api.github.com/users/djkirkham/followers","following_url":"https://api.github.com/users/djkirkham/following{/other_user}","gists_url":"https://api.github.com/users/djkirkham/gists{/gist_id}","starred_url":"https://api.github.com/users/djkirkham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djkirkham/subscriptions","organizations_url":"https://api.github.com/users/djkirkham/orgs","repos_url":"https://api.github.com/users/djkirkham/repos","events_url":"https://api.github.com/users/djkirkham/events{/privacy}","received_events_url":"https://api.github.com/users/djkirkham/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/djkirkham/iris","description":"A powerful, easy to use, and community-driven Python library for analysing and visualising meteorological and oceanographic data sets.","fork":true,"url":"https://api.github.com/repos/djkirkham/iris","forks_url":"https://api.github.com/repos/djkirkham/iris/forks","keys_url":"https://api.github.com/repos/djkirkham/iris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/djkirkham/iris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/djkirkham/iris/teams","hooks_url":"https://api.github.com/repos/djkirkham/iris/hooks","issue_events_url":"https://api.github.com/repos/djkirkham/iris/issues/events{/number}","events_url":"https://api.github.com/repos/djkirkham/iris/events","assignees_url":"https://api.github.com/repos/djkirkham/iris/assignees{/user}","branches_url":"https://api.github.com/repos/djkirkham/iris/branches{/branch}","tags_url":"https://api.github.com/repos/djkirkham/iris/tags","blobs_url":"https://api.github.com/repos/djkirkham/iris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/djkirkham/iris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/djkirkham/iris/git/refs{/sha}","trees_url":"https://api.github.com/repos/djkirkham/iris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/djkirkham/iris/statuses/{sha}","languages_url":"https://api.github.com/repos/djkirkham/iris/languages","stargazers_url":"https://api.github.com/repos/djkirkham/iris/stargazers","contributors_url":"https://api.github.com/repos/djkirkham/iris/contributors","subscribers_url":"https://api.github.com/repos/djkirkham/iris/subscribers","subscription_url":"https://api.github.com/repos/djkirkham/iris/subscription","commits_url":"https://api.github.com/repos/djkirkham/iris/commits{/sha}","git_commits_url":"https://api.github.com/repos/djkirkham/iris/git/commits{/sha}","comments_url":"https://api.github.com/repos/djkirkham/iris/comments{/number}","issue_comment_url":"https://api.github.com/repos/djkirkham/iris/issues/comments{/number}","contents_url":"https://api.github.com/repos/djkirkham/iris/contents/{+path}","compare_url":"https://api.github.com/repos/djkirkham/iris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/djkirkham/iris/merges","archive_url":"https://api.github.com/repos/djkirkham/iris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/djkirkham/iris/downloads","issues_url":"https://api.github.com/repos/djkirkham/iris/issues{/number}","pulls_url":"https://api.github.com/repos/djkirkham/iris/pulls{/number}","milestones_url":"https://api.github.com/repos/djkirkham/iris/milestones{/number}","notifications_url":"https://api.github.com/repos/djkirkham/iris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/djkirkham/iris/labels{/name}","releases_url":"https://api.github.com/repos/djkirkham/iris/releases{/id}","deployments_url":"https://api.github.com/repos/djkirkham/iris/deployments","created_at":"2016-01-20T08:54:11Z","updated_at":"2017-08-10T15:41:05Z","pushed_at":"2017-10-23T10:25:11Z","git_url":"git://github.com/djkirkham/iris.git","ssh_url":"git@github.com:djkirkham/iris.git","clone_url":"https://github.com/djkirkham/iris.git","svn_url":"https://github.com/djkirkham/iris","homepage":"http://scitools.org.uk/iris/","size":104911,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"SciTools:master","ref":"master","sha":"8b5f5bb7bff0774c60c1d4fa870eb5a8491e6b74","user":{"login":"SciTools","id":1391487,"avatar_url":"https://avatars3.githubusercontent.com/u/1391487?v=4","gravatar_id":"","url":"https://api.github.com/users/SciTools","html_url":"https://github.com/SciTools","followers_url":"https://api.github.com/users/SciTools/followers","following_url":"https://api.github.com/users/SciTools/following{/other_user}","gists_url":"https://api.github.com/users/SciTools/gists{/gist_id}","starred_url":"https://api.github.com/users/SciTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciTools/subscriptions","organizations_url":"https://api.github.com/users/SciTools/orgs","repos_url":"https://api.github.com/users/SciTools/repos","events_url":"https://api.github.com/users/SciTools/events{/privacy}","received_events_url":"https://api.github.com/users/SciTools/received_events","type":"Organization","site_admin":false},"repo":{"id":5312648,"name":"iris","full_name":"SciTools/iris","owner":{"login":"SciTools","id":1391487,"avatar_url":"https://avatars3.githubusercontent.com/u/1391487?v=4","gravatar_id":"","url":"https://api.github.com/users/SciTools","html_url":"https://github.com/SciTools","followers_url":"https://api.github.com/users/SciTools/followers","following_url":"https://api.github.com/users/SciTools/following{/other_user}","gists_url":"https://api.github.com/users/SciTools/gists{/gist_id}","starred_url":"https://api.github.com/users/SciTools/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SciTools/subscriptions","organizations_url":"https://api.github.com/users/SciTools/orgs","repos_url":"https://api.github.com/users/SciTools/repos","events_url":"https://api.github.com/users/SciTools/events{/privacy}","received_events_url":"https://api.github.com/users/SciTools/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/SciTools/iris","description":"A powerful, easy to use, and community-driven Python library for analysing and visualising meteorological and oceanographic data sets.","fork":false,"url":"https://api.github.com/repos/SciTools/iris","forks_url":"https://api.github.com/repos/SciTools/iris/forks","keys_url":"https://api.github.com/repos/SciTools/iris/keys{/key_id}","collaborators_url":"https://api.github.com/repos/SciTools/iris/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/SciTools/iris/teams","hooks_url":"https://api.github.com/repos/SciTools/iris/hooks","issue_events_url":"https://api.github.com/repos/SciTools/iris/issues/events{/number}","events_url":"https://api.github.com/repos/SciTools/iris/events","assignees_url":"https://api.github.com/repos/SciTools/iris/assignees{/user}","branches_url":"https://api.github.com/repos/SciTools/iris/branches{/branch}","tags_url":"https://api.github.com/repos/SciTools/iris/tags","blobs_url":"https://api.github.com/repos/SciTools/iris/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/SciTools/iris/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/SciTools/iris/git/refs{/sha}","trees_url":"https://api.github.com/repos/SciTools/iris/git/trees{/sha}","statuses_url":"https://api.github.com/repos/SciTools/iris/statuses/{sha}","languages_url":"https://api.github.com/repos/SciTools/iris/languages","stargazers_url":"https://api.github.com/repos/SciTools/iris/stargazers","contributors_url":"https://api.github.com/repos/SciTools/iris/contributors","subscribers_url":"https://api.github.com/repos/SciTools/iris/subscribers","subscription_url":"https://api.github.com/repos/SciTools/iris/subscription","commits_url":"https://api.github.com/repos/SciTools/iris/commits{/sha}","git_commits_url":"https://api.github.com/repos/SciTools/iris/git/commits{/sha}","comments_url":"https://api.github.com/repos/SciTools/iris/comments{/number}","issue_comment_url":"https://api.github.com/repos/SciTools/iris/issues/comments{/number}","contents_url":"https://api.github.com/repos/SciTools/iris/contents/{+path}","compare_url":"https://api.github.com/repos/SciTools/iris/compare/{base}...{head}","merges_url":"https://api.github.com/repos/SciTools/iris/merges","archive_url":"https://api.github.com/repos/SciTools/iris/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/SciTools/iris/downloads","issues_url":"https://api.github.com/repos/SciTools/iris/issues{/number}","pulls_url":"https://api.github.com/repos/SciTools/iris/pulls{/number}","milestones_url":"https://api.github.com/repos/SciTools/iris/milestones{/number}","notifications_url":"https://api.github.com/repos/SciTools/iris/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/SciTools/iris/labels{/name}","releases_url":"https://api.github.com/repos/SciTools/iris/releases{/id}","deployments_url":"https://api.github.com/repos/SciTools/iris/deployments","created_at":"2012-08-06T10:09:14Z","updated_at":"2017-10-19T12:32:50Z","pushed_at":"2017-10-23T10:33:29Z","git_url":"git://github.com/SciTools/iris.git","ssh_url":"git@github.com:SciTools/iris.git","clone_url":"https://github.com/SciTools/iris.git","svn_url":"https://github.com/SciTools/iris","homepage":"http://scitools.org.uk/iris/","size":104788,"stargazers_count":184,"watchers_count":184,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":131,"mirror_url":null,"archived":false,"open_issues_count":360,"forks":131,"open_issues":360,"watchers":184,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/SciTools/iris/pulls/2812"},"html":{"href":"https://github.com/SciTools/iris/pull/2812"},"issue":{"href":"https://api.github.com/repos/SciTools/iris/issues/2812"},"comments":{"href":"https://api.github.com/repos/SciTools/iris/issues/2812/comments"},"review_comments":{"href":"https://api.github.com/repos/SciTools/iris/pulls/2812/comments"},"review_comment":{"href":"https://api.github.com/repos/SciTools/iris/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/SciTools/iris/pulls/2812/commits"},"statuses":{"href":"https://api.github.com/repos/SciTools/iris/statuses/eb7f2f8960f59971844f2e716f37a73d05d89278"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"djkirkham"}}