Name | axon-pypi JSON |
Version |
1.0.4
JSON |
| download |
home_page | None |
Summary | Multi-dimensional array creation & manipulation library like numpy written from scratch in Python along with a scalar level autograd engine written in C/C++ with Python wrapper |
upload_time | 2025-01-28 13:43:34 |
maintainer | None |
docs_url | None |
author | shivendra |
requires_python | None |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Axon Library

**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.
**Axon.micro:** You have seen [Micrograd](https://github.com/karpathy/micrograd) by Karpathy, this is the upgraded version of micrograd written in c/c++ & has more functions & operational support. A light weight scalar-level autograd engine written in c/c++ & python
## Features
- Element-wise operations (addition, multiplication, etc.)
- Matrix multiplication
- Broadcasting
- Activation functions (ReLU, tanh, sigmoid, GELU)
- Reshape, transpose, flatten
- Data type conversion
- Micrograd support(Scalar level autograd engine)
## Installation
Clone the repository:
```bash
git clone https://github.com/shivendrra/axon.git
cd axon
```
or
Install via pip:
```bash
pip install axon-pypi
```
## Usage
You can use this similar to micrograd to build a simple neural network or do scalar level backprop.
#### Axon.array
```python
import axon
from axon import array
# Create two 2D arrays
a = array([[1, 2], [3, 4]], dtype=axon.int32)
b = array([[5, 6], [7, 8]], dtype=axon.int32)
# Addition
c = a + b
print("Addition:\n", c)
# Multiplication
d = a * b
print("Multiplication:\n", d)
# Matrix Multiplication
e = a @ b
print("Matrix Multiplication:\n", e)
```
### Output:
```
Addition:
array([6, 8], [10, 12], dtype=int32)
Multiplication:
array([5, 12], [21, 32], dtype=int32)
Matrix Multiplication:
array([19, 22], [43, 50], dtype=int32)
```
anyway, prefer documentation for detailed usage guide:
1. [axon.md](https://github.com/shivendrra/axon/blob/main/docs/axon.md): for development purpose
2. [usage.md](https://github.com/shivendrra/axon/blob/main/docs/usage.md): for using it like numpy
3. [axon_micro.md]((https://github.com/shivendrra/axon/blob/main/docs/axon_micro.md)): for axon.micro i.e. scalar autograd engine
#### Axon.micro
```python
from axon.micro import scalar
a = scalar(2)
b = scalar(3)
c = a + b
d = a * b
e = c.relu()
f = d ** 2.0
f.backward()
print(a)
print(b)
print(c)
print(d)
print(e)
print(f)
```
you 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.
## Forking the Repository
If you would like to contribute to this project, you can start by forking the repository:
1. Click the "Fork" button at the top right of this page.
2. Clone your forked repository to your local machine:
```bash
git clone https://github.com/shivendrra/axon.git
```
3. Create a new branch:
```bash
git checkout -b my-feature-branch
```
4. Make your changes.
5. Commit and push your changes:
```bash
git add .
git commit -m "Add my feature"
git push origin my-feature-branch
```
6. Create a pull request on the original repository.
## Testing
To run the unit tests you will have to install PyTorch & Numpy, which the tests use as a reference for verifying the correctness of the calculated gradients & calculated values. Then simply run each file according to your prefrence:
```shell
python -m tests/test_array.py # for testing the axon functions with numpy
python -m tests/test_micro.py # for testing the axon.micro functions with pytorch
```
## Contributing
We welcome contributions! Please follow these steps to contribute:
1. Fork the repository.
2. Create a new branch for your feature or bugfix.
3. Make your changes.
4. Ensure all tests pass.
5. Submit a pull request with a clear description of your changes.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "axon-pypi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "shivendra",
"author_email": "shivendra <shivharsh44@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/66/70/06e19e3cc814ae28db5101a178e7d824cec333811ffd5eb1c5024a800758/axon-pypi-1.0.4.tar.gz",
"platform": null,
"description": "# Axon Library\r\n\r\n\r\n\r\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.\r\n\r\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++ & has more functions & operational support. A light weight scalar-level autograd engine written in c/c++ & python\r\n\r\n## Features\r\n\r\n- Element-wise operations (addition, multiplication, etc.)\r\n- Matrix multiplication\r\n- Broadcasting\r\n- Activation functions (ReLU, tanh, sigmoid, GELU)\r\n- Reshape, transpose, flatten\r\n- Data type conversion\r\n- Micrograd support(Scalar level autograd engine)\r\n\r\n## Installation\r\n\r\nClone the repository:\r\n\r\n```bash\r\ngit clone https://github.com/shivendrra/axon.git\r\ncd axon\r\n```\r\n\r\nor\r\n\r\nInstall via pip:\r\n\r\n```bash\r\npip install axon-pypi\r\n```\r\n\r\n## Usage\r\n\r\nYou can use this similar to micrograd to build a simple neural network or do scalar level backprop.\r\n\r\n\r\n#### Axon.array\r\n\r\n```python\r\nimport axon\r\nfrom axon import array\r\n\r\n# Create two 2D arrays\r\na = array([[1, 2], [3, 4]], dtype=axon.int32)\r\nb = array([[5, 6], [7, 8]], dtype=axon.int32)\r\n\r\n# Addition\r\nc = a + b\r\nprint(\"Addition:\\n\", c)\r\n\r\n# Multiplication\r\nd = a * b\r\nprint(\"Multiplication:\\n\", d)\r\n\r\n# Matrix Multiplication\r\ne = a @ b\r\nprint(\"Matrix Multiplication:\\n\", e)\r\n```\r\n\r\n### Output:\r\n\r\n```\r\nAddition:\r\n array([6, 8], [10, 12], dtype=int32)\r\nMultiplication:\r\n array([5, 12], [21, 32], dtype=int32)\r\nMatrix Multiplication:\r\n array([19, 22], [43, 50], dtype=int32)\r\n```\r\n\r\nanyway, prefer documentation for detailed usage guide:\r\n\r\n1. [axon.md](https://github.com/shivendrra/axon/blob/main/docs/axon.md): for development purpose\r\n2. [usage.md](https://github.com/shivendrra/axon/blob/main/docs/usage.md): for using it like numpy\r\n3. [axon_micro.md]((https://github.com/shivendrra/axon/blob/main/docs/axon_micro.md)): for axon.micro i.e. scalar autograd engine\r\n\r\n#### Axon.micro\r\n```python\r\n\r\nfrom axon.micro import scalar\r\n\r\na = scalar(2)\r\nb = scalar(3)\r\n\r\nc = a + b\r\nd = a * b\r\ne = c.relu()\r\nf = d ** 2.0\r\n\r\nf.backward()\r\n\r\nprint(a)\r\nprint(b)\r\nprint(c)\r\nprint(d)\r\nprint(e)\r\nprint(f)\r\n```\r\n\r\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.\r\n\r\n## Forking the Repository\r\n\r\nIf you would like to contribute to this project, you can start by forking the repository:\r\n\r\n1. Click the \"Fork\" button at the top right of this page.\r\n2. Clone your forked repository to your local machine:\r\n\r\n```bash\r\ngit clone https://github.com/shivendrra/axon.git\r\n```\r\n\r\n3. Create a new branch:\r\n\r\n```bash\r\ngit checkout -b my-feature-branch\r\n```\r\n\r\n4. Make your changes.\r\n5. Commit and push your changes:\r\n\r\n```bash\r\ngit add .\r\ngit commit -m \"Add my feature\"\r\ngit push origin my-feature-branch\r\n```\r\n\r\n6. Create a pull request on the original repository.\r\n\r\n## Testing\r\n\r\nTo run the unit tests you will have to install PyTorch & Numpy, which the tests use as a reference for verifying the correctness of the calculated gradients & calculated values. Then simply run each file according to your prefrence:\r\n\r\n```shell\r\npython -m tests/test_array.py # for testing the axon functions with numpy\r\npython -m tests/test_micro.py # for testing the axon.micro functions with pytorch\r\n```\r\n\r\n## Contributing\r\n\r\nWe welcome contributions! Please follow these steps to contribute:\r\n\r\n1. Fork the repository.\r\n2. Create a new branch for your feature or bugfix.\r\n3. Make your changes.\r\n4. Ensure all tests pass.\r\n5. Submit a pull request with a clear description of your changes.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Multi-dimensional array creation & manipulation library like numpy written from scratch in Python along with a scalar level autograd engine written in C/C++ with Python wrapper",
"version": "1.0.4",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0547719624eaee0a870ae29aec21c3d783b4fbbfd3c59ac73e686a2a8e9dfe69",
"md5": "48030d510a2a0329b0cd390e2305fd2a",
"sha256": "0cf459d15614af304a2b76eacdb53919c7e275dca30c8b940b17d9777494de39"
},
"downloads": -1,
"filename": "axon_pypi-1.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "48030d510a2a0329b0cd390e2305fd2a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 728384,
"upload_time": "2025-01-28T13:43:32",
"upload_time_iso_8601": "2025-01-28T13:43:32.500408Z",
"url": "https://files.pythonhosted.org/packages/05/47/719624eaee0a870ae29aec21c3d783b4fbbfd3c59ac73e686a2a8e9dfe69/axon_pypi-1.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "667006e19e3cc814ae28db5101a178e7d824cec333811ffd5eb1c5024a800758",
"md5": "f1d9bbb993e85452c6ec4474b03b65b4",
"sha256": "a01659ccc080e42be5289962d346cad1741bdd05eca93ea89da1fbfb5e650ac1"
},
"downloads": -1,
"filename": "axon-pypi-1.0.4.tar.gz",
"has_sig": false,
"md5_digest": "f1d9bbb993e85452c6ec4474b03b65b4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 721274,
"upload_time": "2025-01-28T13:43:34",
"upload_time_iso_8601": "2025-01-28T13:43:34.456474Z",
"url": "https://files.pythonhosted.org/packages/66/70/06e19e3cc814ae28db5101a178e7d824cec333811ffd5eb1c5024a800758/axon-pypi-1.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-28 13:43:34",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "axon-pypi"
}