Here is a sample code to create and meander a numpy matrix in the shape of n
x m
:
main.py1404 chars44 lines
You can invoke the meander_matrix function to create a meandering matrix of a desired size:
main.py38 chars3 lines
This will output:
main.py106 chars6 lines
This matrix has 5 rows and 6 columns, with a meandering pattern.
gistlibby LogSnag