{"id":20862425,"url":"https://github.com/nmwsharp/arrgh","last_synced_at":"2025-05-12T09:31:29.496Z","repository":{"id":175699427,"uuid":"654325296","full_name":"nmwsharp/arrgh","owner":"nmwsharp","description":"A small python utility to pretty-print a table summarizing arrays \u0026 scalars from numpy, pytorch, etc.","archived":false,"fork":false,"pushed_at":"2023-06-16T01:26:28.000Z","size":14,"stargazers_count":28,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T05:11:17.445Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nmwsharp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-15T22:09:47.000Z","updated_at":"2024-12-01T04:32:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"8449d675-8f18-4c2b-ba35-6920caed2c8b","html_url":"https://github.com/nmwsharp/arrgh","commit_stats":null,"previous_names":["nmwsharp/printarr"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Farrgh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Farrgh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Farrgh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nmwsharp%2Farrgh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nmwsharp","download_url":"https://codeload.github.com/nmwsharp/arrgh/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253709149,"owners_count":21951108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-18T05:23:50.833Z","updated_at":"2025-05-12T09:31:29.196Z","avatar_url":"https://github.com/nmwsharp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# arrgh\nA small python utility to pretty-print a table summarizing arrays/tensors/scalars from numpy, pytorch, etc.\n\n**Why the name?** \"arr\" is short for \"array\", and \"arrgh\" is the sound you make while debugging your array shapes.\n\n### Example\n\nCalling `arrgh(my_arr1, my_arr2, ...)` prints a table like:\n\n```\n       name | dtype         | shape         | type          | device | min         | max         | mean       \n--------------------------------------------------------------------------------------------------------------\n     [None] | None          | N/A           | NoneType      |        | N/A         | N/A         | N/A        \n    intval1 | int           | scalar        | int           |        |      7      |      7      |      7     \n    intval2 | int           | scalar        | int           |        |     -3      |     -3      |     -3     \n  floatval0 | float         | scalar        | float         |        |     42      |     42      |     42     \n  floatval1 | float         | scalar        | float         |        | 5.5e-12     | 5.5e-12     | 5.5e-12    \n  floatval2 | float         | scalar        | float         |        | 7.72324e+44 | 7.72324e+44 | 7.72324e+44\n     npval1 | int64         | [100]         | numpy.ndarray |        |      0      |     99      |   49.5     \n     npval2 | int64         | [10000]       | numpy.ndarray |        |      0      |   9999      | 4999.5     \n     npval3 | uint64        | [10000]       | numpy.ndarray |        |      0      |   9999      | 4999.5     \n     npval4 | float32       | [100, 10, 10] | numpy.ndarray |        |      0      |   9999      | 4999.5     \n[temporary] | float32       | [10, 8]       | numpy.ndarray |        |      2      |     99      |   50.5     \n     npval5 | int64         | []            | numpy.int64   |        |   9999      |   9999      |   9999     \n  torchval1 | torch.float32 | [1000, 12, 3] | torch.Tensor  | cpu    | -4.08445    | 3.90982     | 0.00404567 \n  torchval2 | torch.float32 | [1000, 12, 3] | torch.Tensor  | cuda:0 | -3.87309    | 3.90342     | 0.00339224 \n  torchval3 | torch.int64   | [1000]        | torch.Tensor  | cpu    |      0      |    999      | N/A        \n  torchval4 | torch.int64   | []            | torch.Tensor  | cpu    |      0      |      0      | N/A\n```\n\nUse keyword arguments like `arrgh(custom_name=3.*my_arr1)` to specify names explicitly or give names to temporaries.\n\n### Installation\n\n`pip install arrgh`\n\n`from arrgh import arrgh`\n\n### Docs\n\nThe package exposes a single function called `arrgh()`. Call it like: `arrgh(my_arr, some_other_arr, maybe_a_scalar)`.\n\nThe function accepts a variable number of arguments. Arrays can also be passed as named optional arguments.\n\nInputs can be:\n- Numpy tensor arrays\n- Pytorch tensor arrays\n- Jax tensor arrays\n- Python ints / floats\n- `None`\n- It may also work with other array-like types, but they have not been tested.\n- Input values which are not arrays or numeric types (strings, objects, etc) will be printed as blank rows in the table.\n\nWhen arrays are passed as variable arguments, the printed name of the array in the table is inferred from the variable name in the outer scope, when possible. When arrays are passed as named keyword arguments, the key name is used.\n\nPass an integer for the `arrgh_float_width` option to specify the precision to which floating point types are printed.\n\nAuthor: Nicholas Sharp (nmwsharp.com)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Farrgh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnmwsharp%2Farrgh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnmwsharp%2Farrgh/lists"}