{"action":"created","comment":{"url":"https://api.github.com/repos/sympy/sympy/pulls/comments/94063037","pull_request_review_id":14593699,"id":94063037,"diff_hunk":"@@ -855,57 +860,32 @@ class Derivative(Expr):\n \n     Derivative wrt non-Symbols:\n \n-    This class also allows derivatives wrt non-Symbols that have _diff_wrt\n+    This class don't allows derivatives wrt non-Symbols that have _diff_wrt\n     set to True, such as Function and Derivative. When a derivative wrt a non-\n     Symbol is attempted, the non-Symbol is temporarily converted to a Symbol\n     while the differentiation is performed.\n \n-    Note that this may seem strange, that Derivative allows things like\n-    f(g(x)).diff(g(x)), or even f(cos(x)).diff(cos(x)).  The motivation for\n-    allowing this syntax is to make it easier to work with variational calculus\n-    (i.e., the Euler-Lagrange method).  The best way to understand this is that\n-    the action of derivative with respect to a non-Symbol is defined by the\n-    above description:  the object is substituted for a Symbol and the\n-    derivative is taken with respect to that.  This action is only allowed for\n-    objects for which this can be done unambiguously, for example Function and\n-    Derivative objects.  Note that this leads to what may appear to be\n-    mathematically inconsistent results.  For example::\n-\n         >>> from sympy import cos, sin, sqrt\n         >>> from sympy.abc import x\n         >>> (2*cos(x)).diff(cos(x))\n-        2\n-        >>> (2*sqrt(1 - sin(x)**2)).diff(cos(x))\n-        0\n+        Traceback (most recent call last):\n+        ...\n+        ValueError: Can't calculate 1st derivative wrt cos(x).\n \n-    This appears wrong because in fact 2*cos(x) and 2*sqrt(1 - sin(x)**2) are\n-    identically equal.  However this is the wrong way to think of this.  Think\n+    However this is the wrong way to think of this.  Think","path":"sympy/core/function.py","position":79,"original_position":79,"commit_id":"b9446b56afa79f689a58d6c864146e2fab4f9115","original_commit_id":"b9446b56afa79f689a58d6c864146e2fab4f9115","user":{"login":"asmeurer","id":71486,"avatar_url":"https://avatars.githubusercontent.com/u/71486?v=3","gravatar_id":"","url":"https://api.github.com/users/asmeurer","html_url":"https://github.com/asmeurer","followers_url":"https://api.github.com/users/asmeurer/followers","following_url":"https://api.github.com/users/asmeurer/following{/other_user}","gists_url":"https://api.github.com/users/asmeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/asmeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmeurer/subscriptions","organizations_url":"https://api.github.com/users/asmeurer/orgs","repos_url":"https://api.github.com/users/asmeurer/repos","events_url":"https://api.github.com/users/asmeurer/events{/privacy}","received_events_url":"https://api.github.com/users/asmeurer/received_events","type":"User","site_admin":false},"body":"This whole paragraph needs to be rewritten. The \"inconsistency\" mostly goes away with undefined functions because they don't have any assumed identities on them, so it just needs to be clear that this works simply by replacing the function by a symbol and differentiating wrt that. ","created_at":"2016-12-28T18:33:09Z","updated_at":"2016-12-28T18:33:09Z","html_url":"https://github.com/sympy/sympy/pull/11962#discussion_r94063037","pull_request_url":"https://api.github.com/repos/sympy/sympy/pulls/11962","_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments/94063037"},"html":{"href":"https://github.com/sympy/sympy/pull/11962#discussion_r94063037"},"pull_request":{"href":"https://api.github.com/repos/sympy/sympy/pulls/11962"}}},"pull_request":{"url":"https://api.github.com/repos/sympy/sympy/pulls/11962","id":98886546,"html_url":"https://github.com/sympy/sympy/pull/11962","diff_url":"https://github.com/sympy/sympy/pull/11962.diff","patch_url":"https://github.com/sympy/sympy/pull/11962.patch","issue_url":"https://api.github.com/repos/sympy/sympy/issues/11962","number":11962,"state":"open","locked":false,"title":"Diff wrt function","user":{"login":"shibasisp","id":13582547,"avatar_url":"https://avatars.githubusercontent.com/u/13582547?v=3","gravatar_id":"","url":"https://api.github.com/users/shibasisp","html_url":"https://github.com/shibasisp","followers_url":"https://api.github.com/users/shibasisp/followers","following_url":"https://api.github.com/users/shibasisp/following{/other_user}","gists_url":"https://api.github.com/users/shibasisp/gists{/gist_id}","starred_url":"https://api.github.com/users/shibasisp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shibasisp/subscriptions","organizations_url":"https://api.github.com/users/shibasisp/orgs","repos_url":"https://api.github.com/users/shibasisp/repos","events_url":"https://api.github.com/users/shibasisp/events{/privacy}","received_events_url":"https://api.github.com/users/shibasisp/received_events","type":"User","site_admin":false},"body":"Fixes #7027\r\n@kaichogami  did a pull request #10597 . But the tests were failing, but when I pulled his branch into my local environment, I didn' find any test failing now.","created_at":"2016-12-21T07:49:35Z","updated_at":"2016-12-28T18:33:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a296b6b46ad11e2b7fe6ec9542e4ca3f772fb64","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/sympy/sympy/pulls/11962/commits","review_comments_url":"https://api.github.com/repos/sympy/sympy/pulls/11962/comments","review_comment_url":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/11962/comments","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/b9446b56afa79f689a58d6c864146e2fab4f9115","head":{"label":"shibasisp:diff_wrt_function","ref":"diff_wrt_function","sha":"b9446b56afa79f689a58d6c864146e2fab4f9115","user":{"login":"shibasisp","id":13582547,"avatar_url":"https://avatars.githubusercontent.com/u/13582547?v=3","gravatar_id":"","url":"https://api.github.com/users/shibasisp","html_url":"https://github.com/shibasisp","followers_url":"https://api.github.com/users/shibasisp/followers","following_url":"https://api.github.com/users/shibasisp/following{/other_user}","gists_url":"https://api.github.com/users/shibasisp/gists{/gist_id}","starred_url":"https://api.github.com/users/shibasisp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shibasisp/subscriptions","organizations_url":"https://api.github.com/users/shibasisp/orgs","repos_url":"https://api.github.com/users/shibasisp/repos","events_url":"https://api.github.com/users/shibasisp/events{/privacy}","received_events_url":"https://api.github.com/users/shibasisp/received_events","type":"User","site_admin":false},"repo":{"id":62818387,"name":"sympy","full_name":"shibasisp/sympy","owner":{"login":"shibasisp","id":13582547,"avatar_url":"https://avatars.githubusercontent.com/u/13582547?v=3","gravatar_id":"","url":"https://api.github.com/users/shibasisp","html_url":"https://github.com/shibasisp","followers_url":"https://api.github.com/users/shibasisp/followers","following_url":"https://api.github.com/users/shibasisp/following{/other_user}","gists_url":"https://api.github.com/users/shibasisp/gists{/gist_id}","starred_url":"https://api.github.com/users/shibasisp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shibasisp/subscriptions","organizations_url":"https://api.github.com/users/shibasisp/orgs","repos_url":"https://api.github.com/users/shibasisp/repos","events_url":"https://api.github.com/users/shibasisp/events{/privacy}","received_events_url":"https://api.github.com/users/shibasisp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shibasisp/sympy","description":"A computer algebra system written in pure Python","fork":true,"url":"https://api.github.com/repos/shibasisp/sympy","forks_url":"https://api.github.com/repos/shibasisp/sympy/forks","keys_url":"https://api.github.com/repos/shibasisp/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shibasisp/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shibasisp/sympy/teams","hooks_url":"https://api.github.com/repos/shibasisp/sympy/hooks","issue_events_url":"https://api.github.com/repos/shibasisp/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/shibasisp/sympy/events","assignees_url":"https://api.github.com/repos/shibasisp/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/shibasisp/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/shibasisp/sympy/tags","blobs_url":"https://api.github.com/repos/shibasisp/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shibasisp/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shibasisp/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/shibasisp/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shibasisp/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/shibasisp/sympy/languages","stargazers_url":"https://api.github.com/repos/shibasisp/sympy/stargazers","contributors_url":"https://api.github.com/repos/shibasisp/sympy/contributors","subscribers_url":"https://api.github.com/repos/shibasisp/sympy/subscribers","subscription_url":"https://api.github.com/repos/shibasisp/sympy/subscription","commits_url":"https://api.github.com/repos/shibasisp/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/shibasisp/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/shibasisp/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/shibasisp/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/shibasisp/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/shibasisp/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shibasisp/sympy/merges","archive_url":"https://api.github.com/repos/shibasisp/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shibasisp/sympy/downloads","issues_url":"https://api.github.com/repos/shibasisp/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/shibasisp/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/shibasisp/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/shibasisp/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shibasisp/sympy/labels{/name}","releases_url":"https://api.github.com/repos/shibasisp/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/shibasisp/sympy/deployments","created_at":"2016-07-07T15:37:05Z","updated_at":"2016-07-07T15:37:12Z","pushed_at":"2016-12-23T10:40:33Z","git_url":"git://github.com/shibasisp/sympy.git","ssh_url":"git@github.com:shibasisp/sympy.git","clone_url":"https://github.com/shibasisp/sympy.git","svn_url":"https://github.com/shibasisp/sympy","homepage":"http://sympy.org/","size":76785,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sympy:master","ref":"master","sha":"eccec64ccf61c1e40b5936bc064b382f0f349d61","user":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"repo":{"id":640534,"name":"sympy","full_name":"sympy/sympy","owner":{"login":"sympy","id":260832,"avatar_url":"https://avatars.githubusercontent.com/u/260832?v=3","gravatar_id":"","url":"https://api.github.com/users/sympy","html_url":"https://github.com/sympy","followers_url":"https://api.github.com/users/sympy/followers","following_url":"https://api.github.com/users/sympy/following{/other_user}","gists_url":"https://api.github.com/users/sympy/gists{/gist_id}","starred_url":"https://api.github.com/users/sympy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sympy/subscriptions","organizations_url":"https://api.github.com/users/sympy/orgs","repos_url":"https://api.github.com/users/sympy/repos","events_url":"https://api.github.com/users/sympy/events{/privacy}","received_events_url":"https://api.github.com/users/sympy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sympy/sympy","description":"A computer algebra system written in pure Python","fork":false,"url":"https://api.github.com/repos/sympy/sympy","forks_url":"https://api.github.com/repos/sympy/sympy/forks","keys_url":"https://api.github.com/repos/sympy/sympy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sympy/sympy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sympy/sympy/teams","hooks_url":"https://api.github.com/repos/sympy/sympy/hooks","issue_events_url":"https://api.github.com/repos/sympy/sympy/issues/events{/number}","events_url":"https://api.github.com/repos/sympy/sympy/events","assignees_url":"https://api.github.com/repos/sympy/sympy/assignees{/user}","branches_url":"https://api.github.com/repos/sympy/sympy/branches{/branch}","tags_url":"https://api.github.com/repos/sympy/sympy/tags","blobs_url":"https://api.github.com/repos/sympy/sympy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sympy/sympy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sympy/sympy/git/refs{/sha}","trees_url":"https://api.github.com/repos/sympy/sympy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sympy/sympy/statuses/{sha}","languages_url":"https://api.github.com/repos/sympy/sympy/languages","stargazers_url":"https://api.github.com/repos/sympy/sympy/stargazers","contributors_url":"https://api.github.com/repos/sympy/sympy/contributors","subscribers_url":"https://api.github.com/repos/sympy/sympy/subscribers","subscription_url":"https://api.github.com/repos/sympy/sympy/subscription","commits_url":"https://api.github.com/repos/sympy/sympy/commits{/sha}","git_commits_url":"https://api.github.com/repos/sympy/sympy/git/commits{/sha}","comments_url":"https://api.github.com/repos/sympy/sympy/comments{/number}","issue_comment_url":"https://api.github.com/repos/sympy/sympy/issues/comments{/number}","contents_url":"https://api.github.com/repos/sympy/sympy/contents/{+path}","compare_url":"https://api.github.com/repos/sympy/sympy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sympy/sympy/merges","archive_url":"https://api.github.com/repos/sympy/sympy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sympy/sympy/downloads","issues_url":"https://api.github.com/repos/sympy/sympy/issues{/number}","pulls_url":"https://api.github.com/repos/sympy/sympy/pulls{/number}","milestones_url":"https://api.github.com/repos/sympy/sympy/milestones{/number}","notifications_url":"https://api.github.com/repos/sympy/sympy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sympy/sympy/labels{/name}","releases_url":"https://api.github.com/repos/sympy/sympy/releases{/id}","deployments_url":"https://api.github.com/repos/sympy/sympy/deployments","created_at":"2010-04-30T20:37:14Z","updated_at":"2016-12-28T13:16:15Z","pushed_at":"2016-12-28T15:12:24Z","git_url":"git://github.com/sympy/sympy.git","ssh_url":"git@github.com:sympy/sympy.git","clone_url":"https://github.com/sympy/sympy.git","svn_url":"https://github.com/sympy/sympy","homepage":"http://sympy.org/","size":76941,"stargazers_count":3455,"watchers_count":3455,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1722,"mirror_url":null,"open_issues_count":2675,"forks":1722,"open_issues":2675,"watchers":3455,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sympy/sympy/pulls/11962"},"html":{"href":"https://github.com/sympy/sympy/pull/11962"},"issue":{"href":"https://api.github.com/repos/sympy/sympy/issues/11962"},"comments":{"href":"https://api.github.com/repos/sympy/sympy/issues/11962/comments"},"review_comments":{"href":"https://api.github.com/repos/sympy/sympy/pulls/11962/comments"},"review_comment":{"href":"https://api.github.com/repos/sympy/sympy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sympy/sympy/pulls/11962/commits"},"statuses":{"href":"https://api.github.com/repos/sympy/sympy/statuses/b9446b56afa79f689a58d6c864146e2fab4f9115"}}}}
{"actor":{"display_login":"asmeurer"}}