numpy-quaddtype 0.0.1__cp311-cp311-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of numpy-quaddtype might be problematic. Click here for more details.
- numpy_quaddtype/__init__.py +45 -0
- numpy_quaddtype/_quaddtype_main.cp311-win_amd64.lib +0 -0
- numpy_quaddtype/_quaddtype_main.cp311-win_amd64.pyd +0 -0
- numpy_quaddtype-0.0.1.dist-info/DELVEWHEEL +2 -0
- numpy_quaddtype-0.0.1.dist-info/METADATA +69 -0
- numpy_quaddtype-0.0.1.dist-info/RECORD +8 -0
- numpy_quaddtype-0.0.1.dist-info/WHEEL +4 -0
- numpy_quaddtype.libs/sleefquad-f9b0d0d7565cf730ea51fea43e8c6b04.dll +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""""" # start delvewheel patch
|
|
2
|
+
def _delvewheel_patch_1_10_1():
|
|
3
|
+
import os
|
|
4
|
+
if os.path.isdir(libs_dir := os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'numpy_quaddtype.libs'))):
|
|
5
|
+
os.add_dll_directory(libs_dir)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
_delvewheel_patch_1_10_1()
|
|
9
|
+
del _delvewheel_patch_1_10_1
|
|
10
|
+
# end delvewheel patch
|
|
11
|
+
|
|
12
|
+
from ._quaddtype_main import (
|
|
13
|
+
QuadPrecision,
|
|
14
|
+
QuadPrecDType,
|
|
15
|
+
is_longdouble_128,
|
|
16
|
+
get_sleef_constant
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
'QuadPrecision', 'QuadPrecDType', 'SleefQuadPrecision', 'LongDoubleQuadPrecision',
|
|
21
|
+
'SleefQuadPrecDType', 'LongDoubleQuadPrecDType', 'is_longdouble_128', 'pi', 'e',
|
|
22
|
+
'log2e', 'log10e', 'ln2', 'ln10', 'max_value', 'min_value', 'epsilon'
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
def SleefQuadPrecision(value):
|
|
26
|
+
return QuadPrecision(value, backend='sleef')
|
|
27
|
+
|
|
28
|
+
def LongDoubleQuadPrecision(value):
|
|
29
|
+
return QuadPrecision(value, backend='longdouble')
|
|
30
|
+
|
|
31
|
+
def SleefQuadPrecDType():
|
|
32
|
+
return QuadPrecDType(backend='sleef')
|
|
33
|
+
|
|
34
|
+
def LongDoubleQuadPrecDType():
|
|
35
|
+
return QuadPrecDType(backend='longdouble')
|
|
36
|
+
|
|
37
|
+
pi = get_sleef_constant("pi")
|
|
38
|
+
e = get_sleef_constant("e")
|
|
39
|
+
log2e = get_sleef_constant("log2e")
|
|
40
|
+
log10e = get_sleef_constant("log10e")
|
|
41
|
+
ln2 = get_sleef_constant("ln2")
|
|
42
|
+
ln10 = get_sleef_constant("ln10")
|
|
43
|
+
max_value = get_sleef_constant("quad_max")
|
|
44
|
+
min_value = get_sleef_constant("quad_min")
|
|
45
|
+
epsilon = get_sleef_constant("epsilon")
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
Version: 1.10.1
|
|
2
|
+
Arguments: ['C:\\hostedtoolcache\\windows\\Python\\3.10.11\\x64\\Scripts\\delvewheel', 'repair', '-w', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-86ny83wo\\cp311-win_amd64\\repaired_wheel', 'C:\\Users\\runneradmin\\AppData\\Local\\Temp\\cibw-run-86ny83wo\\cp311-win_amd64\\built_wheel\\numpy_quaddtype-0.0.1-cp311-cp311-win_amd64.whl', '--add-path', 'C:\\sleef\\bin']
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: numpy_quaddtype
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Quad (128-bit) float dtype for numpy
|
|
5
|
+
Author-Email: Swayam Singh <singhswayam008@gmail.com>
|
|
6
|
+
Requires-Python: >=3.10.0
|
|
7
|
+
Requires-Dist: numpy
|
|
8
|
+
Provides-Extra: test
|
|
9
|
+
Requires-Dist: pytest; extra == "test"
|
|
10
|
+
Description-Content-Type: text/markdown
|
|
11
|
+
|
|
12
|
+
# Numpy-QuadDType
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pip install numpy==2.1.0
|
|
18
|
+
pip install -i https://test.pypi.org/simple/ quaddtype
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```python
|
|
24
|
+
import numpy as np
|
|
25
|
+
from numpy_quaddtype import QuadPrecDType, QuadPrecision
|
|
26
|
+
|
|
27
|
+
# using sleef backend (default)
|
|
28
|
+
np.array([1,2,3], dtype=QuadPrecDType())
|
|
29
|
+
np.array([1,2,3], dtype=QuadPrecDType("sleef"))
|
|
30
|
+
|
|
31
|
+
# using longdouble backend
|
|
32
|
+
np.array([1,2,3], dtype=QuadPrecDType("longdouble"))
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Install from source
|
|
36
|
+
|
|
37
|
+
The code needs the quad precision pieces of the sleef library, which
|
|
38
|
+
is not available on most systems by default, so we have to generate
|
|
39
|
+
that first. The below assumes one has the required pieces to build
|
|
40
|
+
sleef (cmake and libmpfr-dev), and that one is in the package
|
|
41
|
+
directory locally.
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
git clone https://github.com/shibatch/sleef.git
|
|
45
|
+
cd sleef
|
|
46
|
+
cmake -S . -B build -DSLEEF_BUILD_QUAD:BOOL=ON -DSLEEF_BUILD_SHARED_LIBS:BOOL=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
|
47
|
+
cmake --build build/ --clean-first -j
|
|
48
|
+
cd ..
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
In principle, one can now install this system-wide, but easier would
|
|
52
|
+
seem to use the version that was just created, as follows:
|
|
53
|
+
```
|
|
54
|
+
export SLEEF_DIR=$PWD/sleef/build
|
|
55
|
+
export LIBRARY_PATH=$SLEEF_DIR/lib
|
|
56
|
+
export C_INCLUDE_PATH=$SLEEF_DIR/include
|
|
57
|
+
export CPLUS_INCLUDE_PATH=$SLEEF_DIR/include
|
|
58
|
+
python3 -m venv temp
|
|
59
|
+
source temp/bin/activate
|
|
60
|
+
pip install meson-python numpy pytest
|
|
61
|
+
pip install -e . -v --no-build-isolation
|
|
62
|
+
export LD_LIBRARY_PATH=$SLEEF_DIR/lib
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Here, we created an editable install on purpose, so one can just work
|
|
66
|
+
from the package directory if needed, e.g., to run the tests with,
|
|
67
|
+
```
|
|
68
|
+
python -m pytest
|
|
69
|
+
```
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
numpy_quaddtype/_quaddtype_main.cp311-win_amd64.lib,sha256=XIvsoLMVSkGl_UsE07f1D-Esl14S4p-InL9ZiZW84sU,2156
|
|
2
|
+
numpy_quaddtype/_quaddtype_main.cp311-win_amd64.pyd,sha256=OKAwW4Ve93UB7bEySiJUr_R2vm316ZsgBtUZTplBb_8,124416
|
|
3
|
+
numpy_quaddtype/__init__.py,sha256=G4-QdckxPWGHafVhGeDjBR5Wx3jO7GcHzD2fOTusg2M,1395
|
|
4
|
+
numpy_quaddtype-0.0.1.dist-info/DELVEWHEEL,sha256=twk3yxJ32Lyv-0JnEK7NbSq_l3sUdHVK_ru7QOmrWpQ,397
|
|
5
|
+
numpy_quaddtype-0.0.1.dist-info/METADATA,sha256=NDKWunrpSUlJpBpdFdsY2zutEOlUefYz-dV-PB9r1D4,1892
|
|
6
|
+
numpy_quaddtype-0.0.1.dist-info/RECORD,,
|
|
7
|
+
numpy_quaddtype-0.0.1.dist-info/WHEEL,sha256=JdLTWhc73oJ-lqTBYGgiVontr_vhzwzbpAOin_2bxTI,85
|
|
8
|
+
numpy_quaddtype.libs/sleefquad-f9b0d0d7565cf730ea51fea43e8c6b04.dll,sha256=Vf6bagraEzLtf4anfVNmwHp6N1rxS-GbkMK3kvFqDUA,6423040
|
|
Binary file
|