Cody

# Problem 410. Back to basics 20 - singleton dimensions

Solution 507544

Submitted on 2 Oct 2014 by Sam
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% x = rand(2,3,1,4); y_correct = 3; assert(isequal(ndims(remove_dims(x)),y_correct))

2   Pass
%% x = rand(2,3,4); y_correct = 3; assert(isequal(ndims(remove_dims(x)),y_correct))

3   Pass
%% x = rand(1,2,3,4,5); y_correct = 4; assert(isequal(ndims(remove_dims(x)),y_correct))
{"ft_lang_label":"__label__en","ft_lang_prob":0.56736815,"math_prob":0.99952245,"size":594,"snap":"2019-43-2019-47","text_gpt3_token_len":188,"char_repetition_ratio":0.14237288,"word_repetition_ratio":0.025,"special_character_ratio":0.33838382,"punctuation_ratio":0.15966387,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9843883,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-11-11T23:13:42Z\",\"WARC-Record-ID\":\"<urn:uuid:c04cb46d-afdf-4c26-b67b-e89dc15c4474>\",\"Content-Length\":\"71692\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:afc81c11-f8ca-42fb-b7a4-4debc13dba2b>\",\"WARC-Concurrent-To\":\"<urn:uuid:2e688c29-2d46-4f13-bc58-d7df3552409f>\",\"WARC-IP-Address\":\"104.110.193.39\",\"WARC-Target-URI\":\"https://fr.mathworks.com/matlabcentral/cody/problems/410-back-to-basics-20-singleton-dimensions/solutions/507544\",\"WARC-Payload-Digest\":\"sha1:HYTGO3SPD4AGDD277KHKQG4LKPP6HIWT\",\"WARC-Block-Digest\":\"sha1:R5BQDXRBJDQQICQ4R4LPM5LW55OXJR2M\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-47/CC-MAIN-2019-47_segments_1573496664439.7_warc_CC-MAIN-20191111214811-20191112002811-00009.warc.gz\"}"}