Skip to content

Commit 6625031

Browse files
committed
fix
1 parent ed3c2e3 commit 6625031

File tree

3 files changed

+19
-5
lines changed

3 files changed

+19
-5
lines changed

quaddtype/numpy_quaddtype/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import enum
2+
13
from ._quaddtype_main import (
24
QuadPrecision,
35
QuadPrecDType,
@@ -10,8 +12,16 @@
1012

1113
__version__ = "0.2.0"
1214

15+
16+
class QuadBackend(enum.IntEnum):
17+
"""Backend type for QuadPrecision computations."""
18+
SLEEF = 0
19+
LONGDOUBLE = 1
20+
21+
1322
__all__ = [
14-
'QuadPrecision', 'QuadPrecDType', 'SleefQuadPrecision', 'LongDoubleQuadPrecision',
23+
'QuadPrecision', 'QuadPrecDType', 'QuadBackend',
24+
'SleefQuadPrecision', 'LongDoubleQuadPrecision',
1525
'SleefQuadPrecDType', 'LongDoubleQuadPrecDType', 'is_longdouble_128',
1626
# Constants
1727
'pi', 'e', 'log2e', 'log10e', 'ln2', 'ln10', 'max_value', 'epsilon',

quaddtype/numpy_quaddtype/__init__.pyi

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from typing import Final
2+
import enum
23

34
from ._quaddtype_main import (
45
QuadPrecDType,
@@ -10,9 +11,15 @@ from ._quaddtype_main import (
1011
set_num_threads,
1112
)
1213

14+
class QuadBackend(enum.IntEnum):
15+
"""Backend type for QuadPrecision computations."""
16+
SLEEF = 0
17+
LONGDOUBLE = 1
18+
1319
__all__ = [
1420
"QuadPrecision",
1521
"QuadPrecDType",
22+
"QuadBackend",
1623
"SleefQuadPrecision",
1724
"LongDoubleQuadPrecision",
1825
"SleefQuadPrecDType",

quaddtype/numpy_quaddtype/_quaddtype_main.pyi

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from typing import Any, Literal, TypeAlias, final, overload
22
import builtins
3-
import enum
43
import numpy as np
54
from numpy._typing import _128Bit # pyright: ignore[reportPrivateUsage]
65
from typing_extensions import Never, Self, override
76

8-
class QuadBackend(enum.IntEnum):
9-
SLEEF = 0
10-
LONGDOUBLE = 1
7+
from numpy_quaddtype import QuadBackend
118

129
_Backend: TypeAlias = Literal["sleef", "longdouble"]
1310
_IntoQuad: TypeAlias = (

0 commit comments

Comments
 (0)