{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/14318","repository_url":"https://api.github.com/repos/sympy/sympy","labels_url":"https://api.github.com/repos/sympy/sympy/issues/14318/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/14318/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/14318/events","html_url":"https://github.com/sympy/sympy/issues/14318","id":299950051,"node_id":"MDU6SXNzdWUyOTk5NTAwNTE=","number":14318,"title":"Units: remove dimension and scale factor from the definition of Quantity","user":{"login":"Upabjojr","id":4128856,"node_id":"MDQ6VXNlcjQxMjg4NTY=","avatar_url":"https://avatars0.githubusercontent.com/u/4128856?v=4","gravatar_id":"","url":"https://api.github.com/users/Upabjojr","html_url":"https://github.com/Upabjojr","followers_url":"https://api.github.com/users/Upabjojr/followers","following_url":"https://api.github.com/users/Upabjojr/following{/other_user}","gists_url":"https://api.github.com/users/Upabjojr/gists{/gist_id}","starred_url":"https://api.github.com/users/Upabjojr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Upabjojr/subscriptions","organizations_url":"https://api.github.com/users/Upabjojr/orgs","repos_url":"https://api.github.com/users/Upabjojr/repos","events_url":"https://api.github.com/users/Upabjojr/events{/privacy}","received_events_url":"https://api.github.com/users/Upabjojr/received_events","type":"User","site_admin":false},"labels":[{"id":847205682,"node_id":"MDU6TGFiZWw4NDcyMDU2ODI=","url":"https://api.github.com/repos/sympy/sympy/labels/physics.units","name":"physics.units","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":21,"created_at":"2018-02-24T15:46:54Z","updated_at":"2018-08-14T17:08:38Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"Currently `Quantity` is constructed as `Quantity(name, dimension, scale_factor, abbrev)`.\r\n\r\nThe problem: **dimensions** are **not** an **absolute** association to a quantity. For example:\r\n\r\n- in natural units length and time are the same dimension (so you can sum meters and seconds).\r\n- SI and cgs units have different dimensions for the same quantities.\r\n\r\nAt this point a problem arises for scale factor as well: while it is always true that `kilometer / meter == 1000`, some other quantities may have a relative scale factor or not depending on which unit system is currently being used.\r\n\r\nYou need to handle this somewhere else than in the definition of `Quantity`. I would suggest to move the definitions of relative scale factors and dimensions for `Quantity` objects in the `UnitSystem` objects."},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/412945939","html_url":"https://github.com/sympy/sympy/issues/14318#issuecomment-412945939","issue_url":"https://api.github.com/repos/sympy/sympy/issues/14318","id":412945939,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMjk0NTkzOQ==","user":{"login":"schymans","id":3274150,"node_id":"MDQ6VXNlcjMyNzQxNTA=","avatar_url":"https://avatars3.githubusercontent.com/u/3274150?v=4","gravatar_id":"","url":"https://api.github.com/users/schymans","html_url":"https://github.com/schymans","followers_url":"https://api.github.com/users/schymans/followers","following_url":"https://api.github.com/users/schymans/following{/other_user}","gists_url":"https://api.github.com/users/schymans/gists{/gist_id}","starred_url":"https://api.github.com/users/schymans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schymans/subscriptions","organizations_url":"https://api.github.com/users/schymans/orgs","repos_url":"https://api.github.com/users/schymans/repos","events_url":"https://api.github.com/users/schymans/events{/privacy}","received_events_url":"https://api.github.com/users/schymans/received_events","type":"User","site_admin":false},"created_at":"2018-08-14T17:08:38Z","updated_at":"2018-08-14T17:08:38Z","author_association":"CONTRIBUTOR","body":"Wow, no error with simulataneous=True. I narrowed down the problem:\r\n```python\r\nfrom sympy import symbols\r\nimport sympy.physics.units as u\r\nm = symbols('m')\r\nprint 9.81*u.meter\r\ntry:\r\n    print (9.81*u.meter).subs({m: 3 * u.kilogram})\r\nexcept Exception as e1:\r\n    print e1\r\n```\r\nreturns\r\n```\r\n9.81*meter\r\nexpected dimension or 1\r\n```\r\nwhile `u.meter == m` returns `False`, so I have no idea why `.subs({m: 3 * u.kilogram})` does anything at all."}}
{"actor":{"display_login":"schymans"}}