{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/222","labels_url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/222/comments","events_url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/222/events","html_url":"https://github.com/JuliaStats/TimeSeries.jl/pull/222","id":113470054,"number":222,"title":"Add common scalar->scalar math functions as unary operators","user":{"login":"GordStephen","id":2753264,"avatar_url":"https://avatars.githubusercontent.com/u/2753264?v=3","gravatar_id":"","url":"https://api.github.com/users/GordStephen","html_url":"https://github.com/GordStephen","followers_url":"https://api.github.com/users/GordStephen/followers","following_url":"https://api.github.com/users/GordStephen/following{/other_user}","gists_url":"https://api.github.com/users/GordStephen/gists{/gist_id}","starred_url":"https://api.github.com/users/GordStephen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordStephen/subscriptions","organizations_url":"https://api.github.com/users/GordStephen/orgs","repos_url":"https://api.github.com/users/GordStephen/repos","events_url":"https://api.github.com/users/GordStephen/events{/privacy}","received_events_url":"https://api.github.com/users/GordStephen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-10-26T23:09:28Z","updated_at":"2015-10-29T20:24:27Z","closed_at":"2015-10-29T20:19:59Z","pull_request":{"url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/pulls/222","html_url":"https://github.com/JuliaStats/TimeSeries.jl/pull/222","diff_url":"https://github.com/JuliaStats/TimeSeries.jl/pull/222.diff","patch_url":"https://github.com/JuliaStats/TimeSeries.jl/pull/222.patch"},"body":"Unary operator definitions are essentially identical to calling `basecall` with a particular function, so predefine common scalar->scalar math functions as unary operators for convenience.\r\n\r\nExample:\r\n\r\n```julia\r\njulia> sqrt(ohlc)\r\n500x4 TimeSeries.TimeArray{Float64,2,Void} 2000-01-03 to 2001-12-31\r\n\r\n             sqrtOpen  sqrtHigh  sqrtLow  sqrtClose  \r\n2000-01-03 | 10.2411   10.6066   10.0841  10.5802    \r\n2000-01-04 | 10.4043   10.5176   10.0593  10.1242    \r\n2000-01-05 | 10.1858   10.5148   10.1489  10.198     \r\n2000-01-06 | 10.3015   10.3441   9.7468   9.7468     \r\n⋮\r\n2001-12-26 | 4.6206    4.7223    4.5978   4.6357     \r\n2001-12-27 | 4.6454    4.717     4.6454   4.6979     \r\n2001-12-28 | 4.6872    4.7958    4.6861   4.736      \r\n2001-12-31 | 4.7445    4.7603    4.6723   4.6797     \r\n```"},"comment":{"url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/comments/152307937","html_url":"https://github.com/JuliaStats/TimeSeries.jl/pull/222#issuecomment-152307937","issue_url":"https://api.github.com/repos/JuliaStats/TimeSeries.jl/issues/222","id":152307937,"user":{"login":"GordStephen","id":2753264,"avatar_url":"https://avatars.githubusercontent.com/u/2753264?v=3","gravatar_id":"","url":"https://api.github.com/users/GordStephen","html_url":"https://github.com/GordStephen","followers_url":"https://api.github.com/users/GordStephen/followers","following_url":"https://api.github.com/users/GordStephen/following{/other_user}","gists_url":"https://api.github.com/users/GordStephen/gists{/gist_id}","starred_url":"https://api.github.com/users/GordStephen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GordStephen/subscriptions","organizations_url":"https://api.github.com/users/GordStephen/orgs","repos_url":"https://api.github.com/users/GordStephen/repos","events_url":"https://api.github.com/users/GordStephen/events{/privacy}","received_events_url":"https://api.github.com/users/GordStephen/received_events","type":"User","site_admin":false},"created_at":"2015-10-29T20:24:27Z","updated_at":"2015-10-29T20:24:27Z","body":"I'll be finished implementing the 0.7.0 changes in the next few days, so once I am I'll round up all of the upcoming API changes / deprecations and add warnings, transition paths, etc - once that's all done I'll tag a new (final?) 0.6.x release that incorporates this and #219 as well."}}