{"id":28674479,"url":"https://github.com/ludydoo/patronus","last_synced_at":"2025-06-13T21:09:16.786Z","repository":{"id":54780487,"uuid":"152108173","full_name":"ludydoo/Patronus","owner":"ludydoo","description":"N-Dimensional matrices","archived":false,"fork":false,"pushed_at":"2021-01-29T20:23:21.000Z","size":45,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-03-15T06:42:25.747Z","etag":null,"topics":["matrices","matrix-library"],"latest_commit_sha":null,"homepage":null,"language":"C#","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/ludydoo.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":"2018-10-08T16:01:54.000Z","updated_at":"2024-03-15T06:42:25.748Z","dependencies_parsed_at":"2022-08-14T02:50:23.538Z","dependency_job_id":null,"html_url":"https://github.com/ludydoo/Patronus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ludydoo/Patronus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludydoo%2FPatronus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludydoo%2FPatronus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludydoo%2FPatronus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludydoo%2FPatronus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ludydoo","download_url":"https://codeload.github.com/ludydoo/Patronus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ludydoo%2FPatronus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259719752,"owners_count":22901251,"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":["matrices","matrix-library"],"created_at":"2025-06-13T21:09:15.432Z","updated_at":"2025-06-13T21:09:16.757Z","avatar_url":"https://github.com/ludydoo.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/ludydoo/Patronus.svg?branch=master)](https://travis-ci.org/ludydoo/Patronus)\n\n# Patronus\n\nN-Dimensional matrix operations\n\n# Usage\n\n```\n// Empty matrix\nvar matrix = Patronus.Matrix();\n\n// Create a 1 dimension matrix from data\nvar matrix = Patronus.From(1, 2, 3, 4, 5, ..., n);\n\n// Create a 3x3 shaped matrix\nvar matrix = Patronus.Matrix(3, 3, 3)\n\n// Create a 2x2 matrix from data\nvar matrix = Patronus.From(1, 2, 3, 4).Reshape(2, 2);\nvar matrix = Patronus.Matrix(2, 2, new int[]{1, 2, 3, 4});\n```\n\n## Sequence\n\nCreates a matrix with sequenced data\n\n```\n// Creates a 2x2 matrix starting from 1 to 8\n\nvar matrix = Patronus.Matrix(2, 2).Sequence(1).Print()\nvar matrix = Patronus.Sequence(1, 2, 2);\n\nmatrix.Print()\n\n// Output\n//\n// ++++++++  \n// + 1  2 +  \n// + 3  4 +  \n// ++++++++  \n\n\n```\n\n## Randomize\n\nCreates a matrix with random data\n\n```\n\n// Creates a 2x2 matrix with random data between -5 and 5\n\nvar matrix = Patronus.Matrix(2, 2).Randomize(-5, 5).Print()\nvar matrix = Patronus.Random(-5, 5, 2, 2)\n\nmatrix.Print();\n\n// Output\n//\n// ++++++++++  \n// + -1   5 +  \n// +  3   9 +  \n// ++++++++++  \n\n\n```\n\n## Padding\n\nAdds padding\n\n```\n\nvar matrix = new Matrix(2, 2).Sequence(1).Pad(0)\nvar matrix = Patronus.Sequence(1, 2, 2).Pad(0)\n\nmatrix.Print();\n\n// Output\n//\n// +++++++++++++++++++\n// +  0   0   0   0  +\n// +  0   1   2   0  +  \n// +  0   3   4   0  +  \n// +  0   0   0   0  +\n// +++++++++++++++++++\n\n\n```\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludydoo%2Fpatronus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fludydoo%2Fpatronus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fludydoo%2Fpatronus/lists"}