Axon
Lightweight multi-dimensional array manipulation library powered by GPU, similar to NumPy, but trying to be better.
Features
- Custom
arrayclass with Pythonic syntax - Element-wise arithmetic:
+,-,-,/ - Scalar operations (e.g.,
array + 5) - Trigonometric functions:
sin,cos,tan, etc. - Auto handling of
CArray, scalars, and lists - Simple
__str__/__repr__for pretty printing - Reshape, transpose, flatten
- Data type conversion
Requirements
- Python 3.7+
- C compiler (for building the C backend)
- ctypes module (standard in Python)
Getting Started
Build
To use Axon, make sure you have compiled the C backend to a shared library (.dll, .so, or .dylib) and exposed the C functions via ctypes.
Place the compiled .dll (on Windows) or .so (Linux/macOS) in your axon/ folder.
Example
Here's a quick demo of how Axon works:
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:
- usage.md: for user guide & documentation
- technical.md: for contirbutors & contirbution related guide
License
This project is under the Apache-2.0 License.
Release files for axon-pypi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| axon_pypi-0.0.2.tar.gz | 287.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| axon_pypi-0.0.2-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
Total release size: 454.4 kB
Release files / axon_pypi-0.0.2.tar.gz
| Download URL | axon_pypi-0.0.2.tar.gz |
|---|---|
| Size | 287.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18c733ece50c2138bdc15fc91ac07029a2cced7442c69a7a763b215ce516caed
|
|
BLAKE2b-256 checksum How to use checksums |
f875a70f7488773ddf847449f315e2cbcdc3cb6ef0b937b3449d51b0b7c8a3e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / axon_pypi-0.0.2-cp313-cp313-win_amd64.whl
| Download URL | axon_pypi-0.0.2-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 167.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
64d866f55c020a38c07fa8d5bf088ca10af11c199481353132a273076fa61da0
|
|
BLAKE2b-256 checksum How to use checksums |
eed8e06b30034bede3335884bd831feb29f6cd0e54e48e672fdd80e6a202e930
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|