numbox 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.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 numbox might be problematic. Click here for more details.
- numbox/__init__.py +1 -1
- numbox/core/any_type.py +4 -18
- numbox/core/declare_func.py +2270 -0
- numbox/core/proxy.py +87 -0
- {numbox-0.1.1.dist-info → numbox-0.1.3.dist-info}/METADATA +13 -2
- numbox-0.1.3.dist-info/RECORD +14 -0
- numbox-0.1.1.dist-info/RECORD +0 -12
- {numbox-0.1.1.dist-info → numbox-0.1.3.dist-info}/LICENSE +0 -0
- {numbox-0.1.1.dist-info → numbox-0.1.3.dist-info}/WHEEL +0 -0
- {numbox-0.1.1.dist-info → numbox-0.1.3.dist-info}/top_level.txt +0 -0
numbox/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.1.
|
|
1
|
+
__version__ = '0.1.3'
|
numbox/core/any_type.py
CHANGED
|
@@ -27,8 +27,6 @@ class _Content:
|
|
|
27
27
|
|
|
28
28
|
@overload(_Content, strict=False)
|
|
29
29
|
def ol_content(x_ty):
|
|
30
|
-
""" Custom version of `numba.experimental.structref.define_constructor` that extracts
|
|
31
|
-
first-class function type from the `Dispatcher` to be used as struct's member type """
|
|
32
30
|
x_ty = prune_type(x_ty)
|
|
33
31
|
content_type = ContentTypeClass([("x", x_ty)])
|
|
34
32
|
|
|
@@ -51,15 +49,13 @@ class Any(StructRefProxy):
|
|
|
51
49
|
def __new__(cls, x):
|
|
52
50
|
raise NotImplementedError(deleted_any_ctor_error)
|
|
53
51
|
|
|
52
|
+
@njit
|
|
54
53
|
def get_as(self, ty):
|
|
55
|
-
return get_as(
|
|
54
|
+
return self.get_as(ty)
|
|
56
55
|
|
|
56
|
+
@njit
|
|
57
57
|
def reset(self, val):
|
|
58
|
-
return reset(
|
|
59
|
-
|
|
60
|
-
@property
|
|
61
|
-
def p(self):
|
|
62
|
-
raise NotImplementedError('You need to access `p` via `get_as`')
|
|
58
|
+
return self.reset(val)
|
|
63
59
|
|
|
64
60
|
|
|
65
61
|
def _any_deleted_ctor(p):
|
|
@@ -71,16 +67,6 @@ define_boxing(AnyTypeClass, Any)
|
|
|
71
67
|
AnyType = AnyTypeClass([("p", ErasedType)])
|
|
72
68
|
|
|
73
69
|
|
|
74
|
-
@njit
|
|
75
|
-
def get_as(self, ty):
|
|
76
|
-
return self.get_as(ty)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
@njit
|
|
80
|
-
def reset(self, val):
|
|
81
|
-
return self.reset(val)
|
|
82
|
-
|
|
83
|
-
|
|
84
70
|
@overload_method(AnyTypeClass, "get_as", strict=False)
|
|
85
71
|
def ol_get_as(self_class, ty_class):
|
|
86
72
|
def _(self, ty):
|