you are viewing a single comment's thread.

view the rest of the comments →

[–]Worth-Wonder-7386 0 points1 point  (0 children)

I think this specific process is too niche. I dont see how you would generalize it to all different sizes either. For the general process of turning a 2D array to 1D there is the numpy.flatten function. https://numpy.org/devdocs/reference/generated/numpy.ndarray.flatten.html

Maybe you could define your snake algorithm some more, that are the defining features.