Squeeze disappeared (removing dimensions which are equal to 1)?

I found old questions about using squeeze but the function seems to have disappeared.

Did it move into another library ?

I need it because I’m attempting to translate some matlab code :frowning:


squeeze is deprecated in favor of dropdims .


i found an interesting discussion about dropdims.

I’m currently translating code, but based on that discussion I think the right thing to do is to figure out why squeeze was being used, and try and code the functionality such that it doesn’t require it.

1 Like

I don’t know if I am too late to the party, giving the post date, but in Matlab squeeze just calls reshape and is fairly unreliable. I’ve had a lot of headaches with squeeze.

I think it is always better to use reshape and reshape exists in Julia as well.