#19 - Reformat pbm file

Convert pbm file to csv with right height and width
This commit is contained in:
Marc-Antoine Lafreniere
2019-01-23 13:57:08 -05:00
parent 6f3c53bda6
commit fffc76ce2e
7 changed files with 5786 additions and 0 deletions

11
utils/savetofile.py Normal file
View File

@@ -0,0 +1,11 @@
"""
Save a two dimension array in a file
"""
def matrixToFile(matrix, fileName):
with open(fileName, 'w') as f:
for x in matrix:
for y in x:
f.write('%s ' % y )
f.write('\n')