yirgacheffe 1.2.0__py3-none-any.whl → 1.2.1__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 yirgacheffe might be problematic. Click here for more details.
- yirgacheffe/backends/enumeration.py +1 -0
- yirgacheffe/backends/mlx.py +2 -0
- yirgacheffe/backends/numpy.py +2 -0
- yirgacheffe/operators.py +8 -0
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/METADATA +2 -1
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/RECORD +10 -10
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/WHEEL +0 -0
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/entry_points.txt +0 -0
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/licenses/LICENSE +0 -0
- {yirgacheffe-1.2.0.dist-info → yirgacheffe-1.2.1.dist-info}/top_level.txt +0 -0
yirgacheffe/backends/mlx.py
CHANGED
|
@@ -43,6 +43,7 @@ full = mx.full
|
|
|
43
43
|
allclose = mx.allclose
|
|
44
44
|
remainder_op = mx.remainder
|
|
45
45
|
floordiv_op = mx.array.__floordiv__
|
|
46
|
+
abs_op = mx.abs
|
|
46
47
|
|
|
47
48
|
def sum_op(a):
|
|
48
49
|
# There are weird issues around how MLX overflows int8, so just promote the data ahead of summing
|
|
@@ -153,4 +154,5 @@ operator_map = {
|
|
|
153
154
|
op.REMAINDER: mx.remainder,
|
|
154
155
|
op.FLOORDIV: mx.array.__floordiv__,
|
|
155
156
|
op.CONV2D: conv2d_op,
|
|
157
|
+
op.ABS: mx.abs,
|
|
156
158
|
}
|
yirgacheffe/backends/numpy.py
CHANGED
|
@@ -46,6 +46,7 @@ full = np.full
|
|
|
46
46
|
allclose = np.allclose
|
|
47
47
|
remainder_op = np.ndarray.__mod__
|
|
48
48
|
floordiv_op = np.ndarray.__floordiv__
|
|
49
|
+
abs_op = np.abs
|
|
49
50
|
|
|
50
51
|
def conv2d_op(data, weights):
|
|
51
52
|
# torch wants to process dimensions of channels of width of height
|
|
@@ -90,6 +91,7 @@ operator_map = {
|
|
|
90
91
|
op.REMAINDER: np.ndarray.__mod__,
|
|
91
92
|
op.FLOORDIV: np.ndarray.__floordiv__,
|
|
92
93
|
op.CONV2D: conv2d_op,
|
|
94
|
+
op.ABS: np.abs,
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
operator_str_map = {
|
yirgacheffe/operators.py
CHANGED
|
@@ -112,6 +112,13 @@ class LayerMathMixin:
|
|
|
112
112
|
test_elements=test_elements,
|
|
113
113
|
)
|
|
114
114
|
|
|
115
|
+
def abs(self):
|
|
116
|
+
return LayerOperation(
|
|
117
|
+
self,
|
|
118
|
+
op.ABS,
|
|
119
|
+
window_op=WindowOperation.NONE,
|
|
120
|
+
)
|
|
121
|
+
|
|
115
122
|
def log(self):
|
|
116
123
|
return LayerOperation(
|
|
117
124
|
self,
|
|
@@ -736,3 +743,4 @@ exp = LayerOperation.exp
|
|
|
736
743
|
exp2 = LayerOperation.exp2
|
|
737
744
|
nan_to_num = LayerOperation.nan_to_num
|
|
738
745
|
isin = LayerOperation.isin
|
|
746
|
+
abs = LayerOperation.abs # pylint: disable=W0622
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: yirgacheffe
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.1
|
|
4
4
|
Summary: Abstraction of gdal datasets for doing basic math operations
|
|
5
5
|
Author-email: Michael Dales <mwd24@cam.ac.uk>
|
|
6
6
|
License-Expression: ISC
|
|
@@ -295,6 +295,7 @@ with RasterLayer.layer_from_file('test1.tif') as layer1:
|
|
|
295
295
|
|
|
296
296
|
The following math operators common to numpy and other libraries are currently supported:
|
|
297
297
|
|
|
298
|
+
* abs
|
|
298
299
|
* clip
|
|
299
300
|
* exp
|
|
300
301
|
* exp2
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
yirgacheffe/__init__.py,sha256=U5AoPk_iWreSCexG2ID-tmSXiJz4_9Lvzbf42DMvT7k,658
|
|
2
2
|
yirgacheffe/constants.py,sha256=9ZcFLcir4GhPBBDG2rzLhDtJ0pMzpZYuzE9f-CFeA44,12
|
|
3
3
|
yirgacheffe/h3layer.py,sha256=MT2hm6n64hzHSeRPvjn-CwErru937ntKXbEU7CIlPSU,91
|
|
4
|
-
yirgacheffe/operators.py,sha256=
|
|
4
|
+
yirgacheffe/operators.py,sha256=eGa_y5fXXaEb4DkQ7b899bbhzl639yyIVLfVRbkD7vE,26945
|
|
5
5
|
yirgacheffe/rounding.py,sha256=ggBG4lMyLMtHLW3dBxr3gBCcF2qhRrY5etZiFGlIoqA,2258
|
|
6
6
|
yirgacheffe/window.py,sha256=0XZdwD4mz0bRU9eBhFY1Xk1hQt6FqCKp3BnUgxZup3c,5224
|
|
7
7
|
yirgacheffe/backends/__init__.py,sha256=149-fg1PVXC36cgyuSZsU8SYOm65fzUmYN_MHZtEyrY,313
|
|
8
|
-
yirgacheffe/backends/enumeration.py,sha256=
|
|
9
|
-
yirgacheffe/backends/mlx.py,sha256=
|
|
10
|
-
yirgacheffe/backends/numpy.py,sha256
|
|
8
|
+
yirgacheffe/backends/enumeration.py,sha256=lddqmD7Z2z2g2SIPkmgNOiNSSZer3rIuBG3qHwy7t_g,474
|
|
9
|
+
yirgacheffe/backends/mlx.py,sha256=wJ5kUNWdhpE-DLrgsvxpLeiXm7fUlKvrqik976jM9kc,4558
|
|
10
|
+
yirgacheffe/backends/numpy.py,sha256=-y3oLi3BOUuS5l9IJJ3orl08YrPbo9mideW9M1Re6lA,2745
|
|
11
11
|
yirgacheffe/layers/__init__.py,sha256=TrKSHpd-TF7wgC371hka6paFXBnqvDtjJYblproNKZs,1535
|
|
12
12
|
yirgacheffe/layers/area.py,sha256=yIRXzeeLi3MMyuh4LG_VgZrKNWe5xwZgDGdgaoYRpP0,3805
|
|
13
13
|
yirgacheffe/layers/base.py,sha256=pWnmmohGqI4rtH_CruDWfEfOiNcyns-sU2FcNw55ng4,11602
|
|
@@ -17,9 +17,9 @@ yirgacheffe/layers/h3layer.py,sha256=O4u-tGO32SQaEsgNLlgGCOFd4bjm1mt2coZDL23F_HI
|
|
|
17
17
|
yirgacheffe/layers/rasters.py,sha256=8kT2ETplWTJNb7F9HsmqRMz7APolByvIkZuBB0mRduk,11907
|
|
18
18
|
yirgacheffe/layers/rescaled.py,sha256=hEj6BnrJm8o7dMVND5KMpVfg-HVVExovcKRnUl64dRI,2897
|
|
19
19
|
yirgacheffe/layers/vectors.py,sha256=OxXxnV5pss9vSmeiqvmx68ZGmC7iX6Iet0y4b4ZEMcc,14436
|
|
20
|
-
yirgacheffe-1.2.
|
|
21
|
-
yirgacheffe-1.2.
|
|
22
|
-
yirgacheffe-1.2.
|
|
23
|
-
yirgacheffe-1.2.
|
|
24
|
-
yirgacheffe-1.2.
|
|
25
|
-
yirgacheffe-1.2.
|
|
20
|
+
yirgacheffe-1.2.1.dist-info/licenses/LICENSE,sha256=dNSHwUCJr6axStTKDEdnJtfmDdFqlE3h1NPCveqPfnY,757
|
|
21
|
+
yirgacheffe-1.2.1.dist-info/METADATA,sha256=bmztQnEJWScy1ig9svcz_vyy6-I8XIvRESPuf5WgEHc,19844
|
|
22
|
+
yirgacheffe-1.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
23
|
+
yirgacheffe-1.2.1.dist-info/entry_points.txt,sha256=j4KgHXbVGbGyfTySc1ypBdERpfihO4WNjppvCdE9HjE,52
|
|
24
|
+
yirgacheffe-1.2.1.dist-info/top_level.txt,sha256=9DBFlKO2Ld3hG6TuE3qOTd3Tt8ugTiXil4AN4Wr9_y0,12
|
|
25
|
+
yirgacheffe-1.2.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|