mirror of
				https://github.com/onyx-and-iris/grokking-algorithms.git
				synced 2025-10-31 04:21:47 +00:00 
			
		
		
		
	refactor format_and_print()
This commit is contained in:
		
							parent
							
								
									74ada2f373
								
							
						
					
					
						commit
						0d991c54b9
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -158,3 +158,5 @@ cython_debug/ | ||||
| #  and can be added to the global gitignore or merged into this file.  For a more nuclear | ||||
| #  option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||||
| #.idea/ | ||||
| 
 | ||||
| words_alpha.txt | ||||
| @ -44,8 +44,7 @@ def format_and_print(table): | ||||
|         if i == 0: | ||||
|             continue | ||||
|         row[0] = items[i - 1].name | ||||
|     table[0] = [i for i in range(W + 1)] | ||||
|     table[0][0] = None | ||||
|     table[0] = [None, *[i for i in range(1, W + 1)]] | ||||
| 
 | ||||
|     # print tabularised 2D array | ||||
|     logger.info([item.name for item in items]) | ||||
|  | ||||
| @ -44,8 +44,7 @@ def format_and_print(table): | ||||
|         if i == 0: | ||||
|             continue | ||||
|         row[0] = items[i - 1].name | ||||
|     table[0] = [i for i in range(W + 1)] | ||||
|     table[0][0] = None | ||||
|     table[0] = [None, *[i for i in range(1, W + 1)]] | ||||
| 
 | ||||
|     # print tabularised 2D array | ||||
|     logger.info([item.name for item in items]) | ||||
|  | ||||
| @ -44,8 +44,7 @@ def format_and_print(table): | ||||
|         if i == 0: | ||||
|             continue | ||||
|         row[0] = locations[i - 1].name | ||||
|     table[0] = [i / 2 for i in range(2 * (W + 1) - 1)] | ||||
|     table[0][0] = None | ||||
|     table[0] = [None, *[i / 2 for i in range(1, 2 * (W + 1) - 1)]] | ||||
| 
 | ||||
|     # print tabularised 2D array | ||||
|     logger.info([item.name for item in locations]) | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user