Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,11 @@ uv pip install -e .
import mega.op.function as function

number: float = 5.2
print(function.gamma(number))
gamma_function = mega.GammaZ(number)
print(gamma_function.compute())
```

## benchmark information

**Sigma Function**
![sigma_z_benchmark](test/sigma_z_benchmark_vertical.png)
4 changes: 3 additions & 1 deletion mega/op/arithmethic.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ cdef class SigmaZ:
"""
Return string representation of the object
"""
return f"SigmaZ({self.n}, {self.z}) = {SigmaZ(self.n, self.z).compute()}"
return f"SigmaZ({self.n}, {self.z})"

cdef class EulerPhi:
"""
Expand Down Expand Up @@ -238,3 +238,5 @@ cdef class EulerPhi:

def __repr__(self):
return f"EulerPhi({self.n})"


8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ dependencies = [
"cython>=3.1.0",
"numpy>=2.2.6",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"setuptools>=80.7.1",
]

[dependency-groups]
dev = [
"black>=25.1.0",
"matplotlib>=3.10.3",
"pytest>=8.3.5",
]
Binary file added test/bench/sigma_z_benchmark_vertical.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading