{"action":"created","issue":{"url":"https://api.github.com/repos/astropy/astropy/issues/4093","labels_url":"https://api.github.com/repos/astropy/astropy/issues/4093/labels{/name}","comments_url":"https://api.github.com/repos/astropy/astropy/issues/4093/comments","events_url":"https://api.github.com/repos/astropy/astropy/issues/4093/events","html_url":"https://github.com/astropy/astropy/issues/4093","id":103106151,"number":4093,"title":"Add a method to get a number of models in CompoundModel class","user":{"login":"piyanatk","id":2381361,"avatar_url":"https://avatars.githubusercontent.com/u/2381361?v=3","gravatar_id":"","url":"https://api.github.com/users/piyanatk","html_url":"https://github.com/piyanatk","followers_url":"https://api.github.com/users/piyanatk/followers","following_url":"https://api.github.com/users/piyanatk/following{/other_user}","gists_url":"https://api.github.com/users/piyanatk/gists{/gist_id}","starred_url":"https://api.github.com/users/piyanatk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/piyanatk/subscriptions","organizations_url":"https://api.github.com/users/piyanatk/orgs","repos_url":"https://api.github.com/users/piyanatk/repos","events_url":"https://api.github.com/users/piyanatk/events{/privacy}","received_events_url":"https://api.github.com/users/piyanatk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/astropy/astropy/labels/Affects-release","name":"Affects-release","color":"0052cc"},{"url":"https://api.github.com/repos/astropy/astropy/labels/Feature%20Request","name":"Feature Request","color":"bfdadc"},{"url":"https://api.github.com/repos/astropy/astropy/labels/modeling","name":"modeling","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-25T20:11:36Z","updated_at":"2015-08-25T20:56:54Z","closed_at":null,"body":"Currently, `len()` does not give the number of models in a CompoundModel object. You can get around by using `numpy.size(compound_model)`, but it would be nice to have an object method that does just that."},"comment":{"url":"https://api.github.com/repos/astropy/astropy/issues/comments/134739542","html_url":"https://github.com/astropy/astropy/issues/4093#issuecomment-134739542","issue_url":"https://api.github.com/repos/astropy/astropy/issues/4093","id":134739542,"user":{"login":"embray","id":676149,"avatar_url":"https://avatars.githubusercontent.com/u/676149?v=3","gravatar_id":"","url":"https://api.github.com/users/embray","html_url":"https://github.com/embray","followers_url":"https://api.github.com/users/embray/followers","following_url":"https://api.github.com/users/embray/following{/other_user}","gists_url":"https://api.github.com/users/embray/gists{/gist_id}","starred_url":"https://api.github.com/users/embray/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/embray/subscriptions","organizations_url":"https://api.github.com/users/embray/orgs","repos_url":"https://api.github.com/users/embray/repos","events_url":"https://api.github.com/users/embray/events{/privacy}","received_events_url":"https://api.github.com/users/embray/received_events","type":"User","site_admin":false},"created_at":"2015-08-25T20:56:54Z","updated_at":"2015-08-25T20:56:54Z","body":"Incidentally, I did just remember that there is a public member on compound models called `submodel_names`.  So can always do `len(model.submodel_names)`."}}