{"action":"created","issue":{"url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/466","repository_url":"https://api.github.com/repos/SimpleITK/SimpleITK","labels_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/466/labels{/name}","comments_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/466/comments","events_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/466/events","html_url":"https://github.com/SimpleITK/SimpleITK/issues/466","id":321648025,"number":466,"title":"Python keyword arguments disagree with docs","user":{"login":"siboles","id":6530031,"avatar_url":"https://avatars3.githubusercontent.com/u/6530031?v=4","gravatar_id":"","url":"https://api.github.com/users/siboles","html_url":"https://github.com/siboles","followers_url":"https://api.github.com/users/siboles/followers","following_url":"https://api.github.com/users/siboles/following{/other_user}","gists_url":"https://api.github.com/users/siboles/gists{/gist_id}","starred_url":"https://api.github.com/users/siboles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siboles/subscriptions","organizations_url":"https://api.github.com/users/siboles/orgs","repos_url":"https://api.github.com/users/siboles/repos","events_url":"https://api.github.com/users/siboles/events{/privacy}","received_events_url":"https://api.github.com/users/siboles/received_events","type":"User","site_admin":false},"labels":[{"id":525072056,"url":"https://api.github.com/repos/SimpleITK/SimpleITK/labels/Confirmed%20Bug","name":"Confirmed Bug","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-09T16:54:04Z","updated_at":"2018-05-09T18:03:09Z","closed_at":null,"author_association":"NONE","body":"This is a common issue I encounter. The latest occurrence (produced below) came when I updated from 1.0.0 to 1.1.0.\r\n\r\n```\r\nimport SimpleITK as sitk\r\n\r\nimg = sitk.Image(3,3, sitk.sitkFloat32)\r\ng = sitk.DiscreteGaussian(img, variance=(1.0,1.0))\r\n\r\n```\r\nTypeError: DiscreteGaussian() got an unexpected keyword argument 'variance'\r\n\r\nAccording to the docs, this procedural interface can receive variance as either a positional or keyword argument. However in version 1.1.0, only the positional argument works. As I said, I've encountered these inconsistencies in multiple procedural interfaces, so it may be worth looking into some (additional) testing of positional argument vs keyword argument support for classes that have procedural interfaces.\r\n\r\nBest,\r\nScott\r\n"},"comment":{"url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/comments/387825002","html_url":"https://github.com/SimpleITK/SimpleITK/issues/466#issuecomment-387825002","issue_url":"https://api.github.com/repos/SimpleITK/SimpleITK/issues/466","id":387825002,"user":{"login":"siboles","id":6530031,"avatar_url":"https://avatars3.githubusercontent.com/u/6530031?v=4","gravatar_id":"","url":"https://api.github.com/users/siboles","html_url":"https://github.com/siboles","followers_url":"https://api.github.com/users/siboles/followers","following_url":"https://api.github.com/users/siboles/following{/other_user}","gists_url":"https://api.github.com/users/siboles/gists{/gist_id}","starred_url":"https://api.github.com/users/siboles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/siboles/subscriptions","organizations_url":"https://api.github.com/users/siboles/orgs","repos_url":"https://api.github.com/users/siboles/repos","events_url":"https://api.github.com/users/siboles/events{/privacy}","received_events_url":"https://api.github.com/users/siboles/received_events","type":"User","site_admin":false},"created_at":"2018-05-09T18:03:09Z","updated_at":"2018-05-09T18:03:09Z","author_association":"NONE","body":"Thanks for the quick reply. My C++ is weak but in the meantime, would it be good practice to always assign the argument in all overloads i.e.\r\n```\r\nImage DiscreteGaussian ( const Image& image1,\r\n                                            double variance = 1.0,\r\n                                             unsigned int maximumKernelWidth = 32u,\r\n                                             double maximumError =  0.01,\r\n                                             bool useImageSpacing = true );\r\n```\r\nNot sure if this would avoid the wrapping limitation."}}
{"actor":{"display_login":"siboles"}}