A module for generating Oresme numbers (harmonic series partial sums)
Project description
Oresme Numba
| PyPI |
|
| Conda |
|
| DOI |
|
| License: MIT |
|
Oresme numbers refer to the sums related to the harmonic series.
Türkçe Tanım:
Oresme Sayıları, 14. yüzyılda Nicole Oresme tarafından incelenen matematiksel serilerdir. Oresme sayıları harmonik seriye ait toplamları ifade eder. İki türü vardır:
- ( \frac{n}{2^n} ) serisi (Oresme'nin orijinal çalışması),
- Harmonik sayılar (( H_n = 1 + \frac{1}{2} + \cdots + \frac{1}{n} )).
Bu sayılar, analiz ve sayı teorisinde önemli rol oynar.
English Definition:
Oresme Numbers are mathematical series studied by Nicole Oresme in the 14th century. Oresme numbers refer to the sums related to the harmonic series. They include two types:
- The ( \frac{n}{2^n} ) sequence (Oresme's original work),
- Harmonic numbers (( H_n = 1 + \frac{1}{2} + \cdots + \frac{1}{n} )).
These numbers play a key role in analysis and number theory.
Fark/Karşılaştırma (Difference):
- Oresme'nin ( \frac{n}{2^n} ) serisi ıraksaklık kanıtları için önemlidir.
- Harmonik sayılar (( H_n )) ise logaritmik büyüme gösterir ve ( n \to \infty ) iken ıraksar.
- Modern literatürde "Oresme numbers" terimi daha çok tarihsel bağlamda kullanılır.
Kurulum (Türkçe) / Installation (English)
Python ile Kurulum / Install with pip, conda, mamba
pip install oresmen -U
python -m pip install -U oresmen
conda install bilgi::oresmen -y
mamba install bilgi::oresmen -y
- pip uninstall Oresme -y
+ pip install -U oresmen
+ python -m pip install -U oresmen
Test Kurulumu / Test Installation
pip install -i https://test.pypi.org/simple/ oresmen -U
Github Master Kurulumu / GitHub Master Installation
Terminal:
pip install git+https://github.com/WhiteSymmetry/oresmen.git
Jupyter Lab, Notebook, Visual Studio Code:
!pip install git+https://github.com/WhiteSymmetry/oresmen.git
# or
%pip install git+https://github.com/WhiteSymmetry/oresmen.git
Kullanım (Türkçe) / Usage (English)
Note: "\Lib\site-packages\numba_init_.py"
if numpy_version > (2, 0):
msg = (f"Numba needs NumPy 2.0 or less. Got NumPy "
f"{numpy_version[0]}.{numpy_version[1]}.")
raise ImportError(msg)
-->
if numpy_version > (2, 5):
msg = (f"Numba needs NumPy 2.5 or less. Got NumPy "
f"{numpy_version[0]}.{numpy_version[1]}.")
raise ImportError(msg)
import oresmen as on
# Doğrudan erişim (on.main.harmonic_number yerine)
n = 100
hn = on.harmonic_number(n)
print(f"H_{n} = {hn}")
# Enum sınıfına doğrudan erişim
approx_hn = on.harmonic_number_approx(
n,
method=on.ApproximationMethod.EULER_MASCHERONI
)
print(f"H_{n} (Yaklaşık) = {approx_hn}")
# Numba ile hızlandırılmış diziye erişim
sums_array = on.harmonic_numbers_numba(10)
print(f"İlk 10 harmonik sayı: {sums_array}")
import oresmen as on
import numpy as np
import numba
import time
import matplotlib.pyplot as plt
# Simple usage example
plt.figure(figsize=(10, 5))
plt.plot(on.harmonic_numbers_numba(500))
plt.title("First 5000000 Harmonic Numbers")
plt.xlabel("n")
plt.ylabel("H(n)")
plt.show()
import oresmen
oresmen.__version__
import importlib
import inspect
import oresmen as on # Varsa import hatasını yakalamak için
def diagnose_module(module_name):
try:
# Modülü yükle
module = importlib.import_module(module_name)
print(f"\n{' Modül Tanılama Raporu ':=^80}")
print(f"Modül adı: {module_name}")
print(f"Modül dosya yolu: {inspect.getfile(module)}")
# Modülün tüm özelliklerini listele
print("\nModülde bulunan özellikler:")
members = inspect.getmembers(module)
public_members = [name for name, _ in members if not name.startswith('_')]
print(public_members)
# Özel olarak kontrol edilecek fonksiyonlar
required_functions = [
'oresme_sequence',
'harmonic_numbers',
'harmonic_number',
'harmonic_number_numba',
'harmonic_numbers_numba',
'harmonic_generator_numba',
'harmonic_number_approx'
]
print("\nEksik olan fonksiyonlar:")
missing = [fn for fn in required_functions if not hasattr(module, fn)]
print(missing if missing else "Tüm gerekli fonksiyonlar mevcut")
# __all__ değişkenini kontrol et
print("\n__all__ değişkeni:")
if hasattr(module, '__all__'):
print(module.__all__)
else:
print("__all__ tanımlı değil (tüm public fonksiyonlar içe aktarılır)")
except ImportError as e:
print(f"\nHATA: Modül yüklenemedi - {e}")
except Exception as e:
print(f"\nBeklenmeyen hata: {e}")
# Tanılama çalıştır
diagnose_module('oresmen')
# Alternatif olarak doğrudan kontrol
print("\nDoğrudan fonksiyon varlığı kontrolü:")
try:
print("harmonic_numbers_numba mevcut mu?", hasattr(on, 'harmonic_numbers_numba'))
if hasattr(on, 'harmonic_numbers_numba'):
print("Fonksiyon imzası:", inspect.signature(on.harmonic_numbers_numba))
else:
print("Eksik fonksiyon: harmonic_numbers_numba")
except Exception as e:
print("Kontrol sırasında hata:", e)
# 1. Alternatif içe aktarma yöntemi
from oresmen import harmonic_numbers_numba # Doğrudan import deneyin
import oresmen as on
# 2. Modülü yeniden yükleme
import importlib
importlib.reload(on)
# 3. Fonksiyonun alternatif isimle var olup olmadığını kontrol
print("Alternatif fonksiyon isimleri:", [name for name in dir(on) if 'harmonic' in name.lower()])
Development
# Clone the repository
git clone https://github.com/WhiteSymmetry/oresmen.git
cd oresmen
# Install in development mode
python -m pip install -ve . # Install package in development mode
# Run tests
pytest
Notebook, Jupyterlab, Colab, Visual Studio Code
!python -m pip install git+https://github.com/WhiteSymmetry/oresmen.git
Citation
If this library was useful to you in your research, please cite us. Following the GitHub citation standards, here is the recommended citation.
BibTeX
APA
Keçeci, M. (2025). oresmen [Data set]. ResearchGate. https://doi.org/10.13140/RG.2.2.19566.52804
Keçeci, M. (2025). oresmen [Data set]. figshare. https://doi.org/
Keçeci, M. (2025). oresmen [Data set]. WorkflowHub. https://doi.org/
Keçeci, M. (2025). oresmen (0.1.0). Zenodo. https://doi.org/10.5281/zenodo.16634186
Chicago
Keçeci, Mehmet. oresmen [Data set]. ResearchGate, 2025. https://doi.org/10.13140/RG.2.2.19566.52804
Keçeci, Mehmet (2025). oresmen [Data set]. figshare, 2025. https://doi.org/
Keçeci, Mehmet. oresmen [Data set]. WorkflowHub, 2025. https://doi.org/
Keçeci, Mehmet. oresmen. Open Science Articles (OSAs), Zenodo, 2025. [https://doi.org/](https://doi.org/10.5281/zenodo.16634186)
Lisans (Türkçe) / License (English)
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file oresmen-0.1.3.tar.gz.
File metadata
- Download URL: oresmen-0.1.3.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aaa57981025fe4420cb8d452ca388252443a91a171b2b1b9fd7e669cfd0cfa66
|
|
| MD5 |
9b4210465c8fe4648eda850eb8267e56
|
|
| BLAKE2b-256 |
fc8e33ecda81444d84abe6d2062df5b43e71b1be16b89846cbecbab0f49e817b
|
Provenance
The following attestation bundles were made for oresmen-0.1.3.tar.gz:
Publisher:
workflow.yml on WhiteSymmetry/oresmen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oresmen-0.1.3.tar.gz -
Subject digest:
aaa57981025fe4420cb8d452ca388252443a91a171b2b1b9fd7e669cfd0cfa66 - Sigstore transparency entry: 1177714052
- Sigstore integration time:
-
Permalink:
WhiteSymmetry/oresmen@226907bedc6b4ece786b5fb2bebf21637fb746e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WhiteSymmetry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@226907bedc6b4ece786b5fb2bebf21637fb746e5 -
Trigger Event:
push
-
Statement type:
File details
Details for the file oresmen-0.1.3-py3-none-any.whl.
File metadata
- Download URL: oresmen-0.1.3-py3-none-any.whl
- Upload date:
- Size: 22.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77d82ae718a0296864560575efa2dfccbc394301403ad680d699509b7cae7951
|
|
| MD5 |
a80aacebdbc9a45ca478d6c786902955
|
|
| BLAKE2b-256 |
c4532185cdce53c5f5892f89e570d6343d5055b0919d636eeb40d4283c688adf
|
Provenance
The following attestation bundles were made for oresmen-0.1.3-py3-none-any.whl:
Publisher:
workflow.yml on WhiteSymmetry/oresmen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oresmen-0.1.3-py3-none-any.whl -
Subject digest:
77d82ae718a0296864560575efa2dfccbc394301403ad680d699509b7cae7951 - Sigstore transparency entry: 1177714234
- Sigstore integration time:
-
Permalink:
WhiteSymmetry/oresmen@226907bedc6b4ece786b5fb2bebf21637fb746e5 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/WhiteSymmetry
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@226907bedc6b4ece786b5fb2bebf21637fb746e5 -
Trigger Event:
push
-
Statement type: