{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/8058","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/8058/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/8058/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/8058/events","html_url":"https://github.com/scipy/scipy/pull/8058","id":267341109,"number":8058,"title":"TST: special: simplify `Arg`","user":{"login":"person142","id":15134881,"avatar_url":"https://avatars2.githubusercontent.com/u/15134881?v=4","gravatar_id":"","url":"https://api.github.com/users/person142","html_url":"https://github.com/person142","followers_url":"https://api.github.com/users/person142/followers","following_url":"https://api.github.com/users/person142/following{/other_user}","gists_url":"https://api.github.com/users/person142/gists{/gist_id}","starred_url":"https://api.github.com/users/person142/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/person142/subscriptions","organizations_url":"https://api.github.com/users/person142/orgs","repos_url":"https://api.github.com/users/person142/repos","events_url":"https://api.github.com/users/person142/events{/privacy}","received_events_url":"https://api.github.com/users/person142/received_events","type":"User","site_admin":false},"labels":[{"id":199201380,"url":"https://api.github.com/repos/scipy/scipy/labels/needs-decision","name":"needs-decision","color":"fbca04","default":false},{"id":37340790,"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.special","name":"scipy.special","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-21T01:32:34Z","updated_at":"2017-10-21T12:10:17Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/8058","html_url":"https://github.com/scipy/scipy/pull/8058","diff_url":"https://github.com/scipy/scipy/pull/8058.diff","patch_url":"https://github.com/scipy/scipy/pull/8058.patch"},"body":"This fixes a couple of things:\r\n\r\n- Before the `TestSystematic` tests in `test_mpmath` could severely\r\n   overestimate the desired number of points.\r\n- Before the spread of points returned from `Arg` could be fairly\r\n   different than what was requested.\r\n\r\nNote, however, that this changes the test points for a lot of tests. (And requires tweaking tolerances accordingly.) On the one hand, the points we thought we were testing at weren't necessarily the points we were testing at. On the other hand, there's a lot of potential for this to break things and make us have to track down a new crop of failures.\r\n\r\nExamples\r\n----------\r\n\r\n```\r\n>>> import scipy\r\n>>> scipy.__version__\r\n'0.19.0'\r\n>>> from scipy.special._mptestutils import Arg, ComplexArg, get_args\r\n>>> args = get_args([Arg(), ComplexArg()], 500)\r\n>>> args.shape\r\n(9261, 2)\r\n>>> Arg(-200, 200).values(20)\r\narray([ -1.00000000e+01,  -9.00000000e+00,  -5.50000000e+00,\r\n        -1.00000000e+00,  -6.00000000e-01,  -2.00000000e-01,\r\n        -1.00000000e-01,  -3.16227766e-16,  -1.00000000e-30,\r\n         0.00000000e+00,   1.00000000e-30,   3.16227766e-16,\r\n         1.00000000e-01,   2.00000000e-01,   6.00000000e-01,\r\n         1.00000000e+00,   5.50000000e+00,   9.00000000e+00,\r\n         1.00000000e+01])\r\n```\r\n\r\n```\r\n>>> import scipy\r\n>>> scipy.__version__\r\n'1.1.0.dev0+59d4448'\r\n>>> from scipy.special._mptestutils import Arg, ComplexArg, get_args\r\n>>> args = get_args([Arg(), ComplexArg()], 500)\r\n>>> args.shape\r\n(546, 2)\r\n>>> Arg(-200, 200).values(20)\r\narray([ -2.00000000e+02,  -5.15260277e-02,  -1.32746577e-05,\r\n        -3.41995189e-09,  -8.81082680e-13,  -2.26993453e-16,\r\n        -5.84803548e-20,  -1.50663019e-23,  -3.88153345e-27,\r\n        -1.00000000e-30,   0.00000000e+00,   1.00000000e-30,\r\n         1.09050773e-26,   1.18920712e-22,   1.29683955e-18,\r\n         1.41421356e-14,   1.54221083e-10,   1.68179283e-06,\r\n         1.83400809e-02,   2.00000000e+02])\r\n```\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/338388228","html_url":"https://github.com/scipy/scipy/pull/8058#issuecomment-338388228","issue_url":"https://api.github.com/repos/scipy/scipy/issues/8058","id":338388228,"user":{"login":"person142","id":15134881,"avatar_url":"https://avatars2.githubusercontent.com/u/15134881?v=4","gravatar_id":"","url":"https://api.github.com/users/person142","html_url":"https://github.com/person142","followers_url":"https://api.github.com/users/person142/followers","following_url":"https://api.github.com/users/person142/following{/other_user}","gists_url":"https://api.github.com/users/person142/gists{/gist_id}","starred_url":"https://api.github.com/users/person142/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/person142/subscriptions","organizations_url":"https://api.github.com/users/person142/orgs","repos_url":"https://api.github.com/users/person142/repos","events_url":"https://api.github.com/users/person142/events{/privacy}","received_events_url":"https://api.github.com/users/person142/received_events","type":"User","site_admin":false},"created_at":"2017-10-21T12:10:17Z","updated_at":"2017-10-21T12:10:17Z","author_association":"MEMBER","body":"> The question now is: do you really want a logspace distribution, or is it more important to test numbers of order 1?\r\n\r\nSome thoughts: what I'd like to see is the mpmath tests restricting the range of `Arg`/`ComplexArg` more often and then removing the use of `exception_to_nan` and `nan_ok=True`. I think the latter two features often make you think functions work in ranges where they don't. (For a recent example, in https://github.com/scipy/scipy/pull/8028 I realized that only about 30 points were actually getting checked for `lambertw`.)\r\n\r\nIf the range of `Arg`/`ComplexArg` is restricted, then I think a logspace distribution is appropriate. (Perhaps the default small value around 0 should be larger than `1e-30` though.) So in my mind:\r\n\r\n- With the ideal versions of the tests this selection of points would be ok\r\n- We don't have the ideal versions of the tests\r\n- We don't want to change test points very frequently\r\n- Given all that, is it ok to change them now?\r\n"}}
{"actor":{"display_login":"person142"}}