Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Added print_grid function, print grid to terminal #2

Closed

Conversation

Rafaelblsilva
Copy link

@mxbi Thanks for the awesome project!

I Haphazardly added a function to print the grid to the terminal. It is based on the rich library.

Example:

import arckit
import arckit.vis as vis
train_set, eval_set = arckit.load_data() # Load ARC1 train/eval

task = train_set[0]

for ex in task.train:
    print("Input: ")
    grid = vis.draw_grid(ex[0])
    vis.print_grid(grid)
    print('Output: ')
    grid = vis.draw_grid(ex[1])
    vis.print_grid(grid)
    print()

Should print to the terminal:

image

@mxbi
Copy link
Owner

mxbi commented Oct 16, 2023

Awesome! I really like the printing style.

I'm wondering whether we can extend this to take in numpy arrays (the standard grid format for Task) rather than essentially inverting the draw_grid call, which might have some weird behaviour if called on the result of draw_task, for example.

@mxbi
Copy link
Owner

mxbi commented Nov 11, 2024

I'm closing this in favour of #12 - thank you for the suggestion!

@mxbi mxbi closed this Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants