{"id":15043587,"url":"https://github.com/pjessesco/print2d","last_synced_at":"2026-01-07T04:39:13.027Z","repository":{"id":57454809,"uuid":"346972763","full_name":"pjessesco/print2d","owner":"pjessesco","description":"Replacement of `print()` for printing 2d array with readability including Torch and Numpy.","archived":false,"fork":false,"pushed_at":"2021-03-30T05:30:57.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-01T18:24:48.138Z","etag":null,"topics":["formatted-text","numpy","print","python3","readability","torch"],"latest_commit_sha":null,"homepage":"","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/pjessesco.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}},"created_at":"2021-03-12T07:02:20.000Z","updated_at":"2025-01-06T16:58:47.000Z","dependencies_parsed_at":"2022-09-05T07:01:29.565Z","dependency_job_id":null,"html_url":"https://github.com/pjessesco/print2d","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjessesco%2Fprint2d","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjessesco%2Fprint2d/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjessesco%2Fprint2d/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pjessesco%2Fprint2d/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pjessesco","download_url":"https://codeload.github.com/pjessesco/print2d/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245858873,"owners_count":20684062,"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":["formatted-text","numpy","print","python3","readability","torch"],"created_at":"2024-09-24T20:49:18.564Z","updated_at":"2026-01-07T04:39:08.007Z","avatar_url":"https://github.com/pjessesco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# print2d : Print 2d array with readability\n\n[![PyPI version](https://badge.fury.io/py/print2d.svg)](https://badge.fury.io/py/print2d) \n\nReplacement of `print()` for printing 2d array with readability.\n\n    print2d(mat1, \"*\" ,mat2, \"=\", mult)\n\n    [[4.  3.  1.  1. ]  * [[1 2 3]  = [[26.  24.  39. ]  \n     [6.  2.  4.  8. ]     [5 2 6]     [64.  84.  98. ]  \n     [1.1 6.6 1.5 0.1]]    [2 3 1]     [37.6 20.6 45.2]] \n                           [5 7 8]]  \n\n## Available types\n\n - Python `list`\n - NumPy `ndarray`\n - PyTorch `Tensor`\n\n## Install\n\n    pip install print2d\n\n\n## Usage\n\nImport this module \n\n    from print2d import *\n\n`print2d()` function gets parameter separated with comma(,).\n\n### Python list\n\n    arr1 = [[1,2],[3,4], [5,6]]\n    arr2 = [[1, 2, 3], [4, 5, 6]]\n    print2d(\"arr1\", arr1, \"arr2\", arr2)\n\n---\n    arr1 [[1, 2]  arr2 [[1, 2, 3]  \n          [3, 4]        [4, 5, 6]] \n          [5, 6]]                  \n\n### NumPy ndarray\n\n    np1 = np.array([[1,2],[3,4], [5,6]])\n    np2 = np.array([[1, 2, 3], [4, 5, 6]])\n    print2d(\"np1\", np1, \"np2\", np2)\n\n---\n    np1 [[1 2]  np2 [[1 2 3]  \n         [3 4]       [4 5 6]] \n         [5 6]]        \n\n### PyTorch Tensor\n\n    tc1 = torch.tensor([[1,2],[3,4], [5,6]])\n    tc2 = torch.tensor([[1, 2, 3], [4, 5, 6]])\n    print2d(\"tc1\", tc1, \"tc2\", tc2)\n\n---\n    tc1 tensor([[1, 2],  tc2 tensor([[1, 2, 3],  \n                [3, 4],              [4, 5, 6]]) \n                [5, 6]])    \n\n### Combination\n\n    arr1 = [[1,2],[3,4], [5,6]]\n    np2 = np.array([[1, 2, 3], [4, 5, 6]])\n    print2d(\"arr1\", arr1, \"np2\", np2)\n\n---\n    arr1 [[1, 2]  np2 [[1 2 3]  \n          [3, 4]       [4 5 6]] \n          [5, 6]]               \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjessesco%2Fprint2d","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpjessesco%2Fprint2d","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpjessesco%2Fprint2d/lists"}