I want my array to trim itself down to just contain the main data. Sometimes columns and rows on the sides, top, or bottom will become completely empty (filled with 0s) and I want to delete this.
The image shows how it works - the blue box should be the array after trimming is complete. Just everything that I need
I've tried for a while but can't figure it out. Any ideas?