{"id":17736619,"url":"https://github.com/shivendrra/axon","last_synced_at":"2026-02-26T02:42:43.767Z","repository":{"id":245425422,"uuid":"818209598","full_name":"shivendrra/axon","owner":"shivendrra","description":"numpy written in python from scratch ","archived":false,"fork":false,"pushed_at":"2024-09-07T06:19:03.000Z","size":1514,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-06T19:06:29.827Z","etag":null,"topics":["array-manipulations","autograd-engine","axon","c","micrograd","python","scalar-values","tensor-library"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/axon-pypi/","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/shivendrra.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":"2024-06-21T10:36:47.000Z","updated_at":"2024-09-07T06:19:06.000Z","dependencies_parsed_at":"2024-08-17T19:21:39.214Z","dependency_job_id":"9ca57e5a-af6b-45ea-934d-10cbd6885c00","html_url":"https://github.com/shivendrra/axon","commit_stats":null,"previous_names":["shivendrra/axon"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivendrra%2Faxon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivendrra%2Faxon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivendrra%2Faxon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shivendrra%2Faxon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shivendrra","download_url":"https://codeload.github.com/shivendrra/axon/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243593259,"owners_count":20316156,"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":["array-manipulations","autograd-engine","axon","c","micrograd","python","scalar-values","tensor-library"],"created_at":"2024-10-26T00:23:45.489Z","updated_at":"2026-02-26T02:42:38.741Z","avatar_url":"https://github.com/shivendrra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Axon Library\n\n![axonlogo.png](https://github.com/shivendrra/axon/blob/main/logo.png)\n\n**Axon:** is a lightweight Python library for creating and manipulating multi-dimensional arrays, inspired by libraries such as NumPy. It's written in python only, for now.\n\n**Axon.micro:** You have seen [Micrograd](https://github.com/karpathy/micrograd) by Karpathy, this is the upgraded version of micrograd written in c/c++ \u0026 has more functions \u0026 operational support. A light weight scalar-level autograd engine written in c/c++ \u0026 python\n\n## Features\n\n- Element-wise operations (addition, multiplication, etc.)\n- Matrix multiplication\n- Broadcasting\n- Activation functions (ReLU, tanh, sigmoid, GELU)\n- Reshape, transpose, flatten\n- Data type conversion\n- Micrograd support(Scalar level autograd engine)\n\n## Installation\n\nClone the repository:\n\n```bash\ngit clone https://github.com/shivendrra/axon.git\ncd axon\n```\n\nor\n\nInstall via pip:\n\n```bash\npip install axon-pypi\n```\n\n## Usage\n\nYou can use this similar to micrograd to build a simple neural network or do scalar level backprop.\n\n\n#### Axon.array\n\n```python\nimport axon\nfrom axon import array\n\n# Create two 2D arrays\na = array([[1, 2], [3, 4]], dtype=axon.int32)\nb = array([[5, 6], [7, 8]], dtype=axon.int32)\n\n# Addition\nc = a + b\nprint(\"Addition:\\n\", c)\n\n# Multiplication\nd = a * b\nprint(\"Multiplication:\\n\", d)\n\n# Matrix Multiplication\ne = a @ b\nprint(\"Matrix Multiplication:\\n\", e)\n```\n\n### Output:\n\n```\nAddition:\n array([6, 8], [10, 12], dtype=int32)\nMultiplication:\n array([5, 12], [21, 32], dtype=int32)\nMatrix Multiplication:\n array([19, 22], [43, 50], dtype=int32)\n```\n\nanyway, prefer documentation for detailed usage guide:\n\n1. [axon.md](https://github.com/shivendrra/axon/blob/main/docs/axon.md): for development purpose\n2. [usage.md](https://github.com/shivendrra/axon/blob/main/docs/usage.md): for using it like numpy\n3. [axon_micro.md]((https://github.com/shivendrra/axon/blob/main/docs/axon_micro.md)): for axon.micro i.e. scalar autograd engine\n\n#### Axon.micro\n```python\n\nfrom axon.micro import scalar\n\na = scalar(2)\nb = scalar(3)\n\nc = a + b\nd = a * b\ne = c.relu()\nf = d ** 2.0\n\nf.backward()\n\nprint(a)\nprint(b)\nprint(c)\nprint(d)\nprint(e)\nprint(f)\n```\n\nyou can even checkout [example](https://github.com/shivendrra/axon/tree/main/examples) neural networks to run them on your system, or build your own :-D.\n\n## Forking the Repository\n\nIf you would like to contribute to this project, you can start by forking the repository:\n\n1. Click the \"Fork\" button at the top right of this page.\n2. Clone your forked repository to your local machine:\n\n```bash\ngit clone https://github.com/shivendrra/axon.git\n```\n\n3. Create a new branch:\n\n```bash\ngit checkout -b my-feature-branch\n```\n\n4. Make your changes.\n5. Commit and push your changes:\n\n```bash\ngit add .\ngit commit -m \"Add my feature\"\ngit push origin my-feature-branch\n```\n\n6. Create a pull request on the original repository.\n\n## Testing\n\nTo run the unit tests you will have to install PyTorch \u0026 Numpy, which the tests use as a reference for verifying the correctness of the calculated gradients \u0026 calculated values. Then simply run each file according to your prefrence:\n\n```shell\npython -m tests/test_array.py # for testing the axon functions with numpy\npython -m tests/test_micro.py # for testing the axon.micro functions with pytorch\n```\n\n## Contributing\n\nWe welcome contributions! Please follow these steps to contribute:\n\n1. Fork the repository.\n2. Create a new branch for your feature or bugfix.\n3. Make your changes.\n4. Ensure all tests pass.\n5. Submit a pull request with a clear description of your changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivendrra%2Faxon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshivendrra%2Faxon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshivendrra%2Faxon/lists"}