{"action":"closed","issue":{"url":"https://api.github.com/repos/v0dro/daru/issues/190","repository_url":"https://api.github.com/repos/v0dro/daru","labels_url":"https://api.github.com/repos/v0dro/daru/issues/190/labels{/name}","comments_url":"https://api.github.com/repos/v0dro/daru/issues/190/comments","events_url":"https://api.github.com/repos/v0dro/daru/issues/190/events","html_url":"https://github.com/v0dro/daru/issues/190","id":166878516,"number":190,"title":"Re assign base category on reordering","user":{"login":"lokeshh","id":7677524,"avatar_url":"https://avatars.githubusercontent.com/u/7677524?v=3","gravatar_id":"","url":"https://api.github.com/users/lokeshh","html_url":"https://github.com/lokeshh","followers_url":"https://api.github.com/users/lokeshh/followers","following_url":"https://api.github.com/users/lokeshh/following{/other_user}","gists_url":"https://api.github.com/users/lokeshh/gists{/gist_id}","starred_url":"https://api.github.com/users/lokeshh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lokeshh/subscriptions","organizations_url":"https://api.github.com/users/lokeshh/orgs","repos_url":"https://api.github.com/users/lokeshh/repos","events_url":"https://api.github.com/users/lokeshh/events{/privacy}","received_events_url":"https://api.github.com/users/lokeshh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/v0dro/daru/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-21T17:49:08Z","updated_at":"2016-07-29T05:59:59Z","closed_at":"2016-07-29T05:59:59Z","body":"It makes sense to re assign base category after re-ording the categories. For example:\r\n\r\n```ruby\r\n?> dv = Daru::Vector.new [:a, :a, :b, :c], type: :category\r\n=> #<Daru::Vector(4):cataegory>\r\n   0   a\r\n   1   a\r\n   2   b\r\n   3   c\r\n>> dv.base_category\r\n=> :a\r\n>> dv.categories = [:c, :b, :a]\r\n=> [:c, :b, :a]\r\n>> dv.base_category\r\n=> :a\r\n```\r\nIt would be nice to have the base category set to `:c` because it occurs first in the new order."}}
{"actor":{"display_login":"v0dro"}}