File tree Expand file tree Collapse file tree 1 file changed +124
-0
lines changed Expand file tree Collapse file tree 1 file changed +124
-0
lines changed Original file line number Diff line number Diff line change 7
7
# http://arrayfire.com/licenses/BSD-3-Clause
8
8
########################################################
9
9
10
+ """
11
+ module containing enums and other constants from arrayfire library
12
+ """
13
+
10
14
import platform
11
15
import ctypes as ct
12
16
from enum import Enum
@@ -73,6 +77,10 @@ def lock(self):
73
77
74
78
75
79
class ERR (Enum ):
80
+ """
81
+ Error values. For internal use only.
82
+ """
83
+
76
84
NONE = (0 )
77
85
78
86
#100-199 Errors in environment
@@ -101,6 +109,9 @@ class ERR(Enum):
101
109
UNKNOWN = (999 )
102
110
103
111
class Dtype (Enum ):
112
+ """
113
+ Error values. For internal use only.
114
+ """
104
115
f32 = (0 )
105
116
c32 = (1 )
106
117
f64 = (2 )
@@ -113,62 +124,172 @@ class Dtype(Enum):
113
124
u64 = (9 )
114
125
115
126
class Source (Enum ):
127
+ """
128
+ Source of the pointer
129
+ """
116
130
device = (0 )
117
131
host = (1 )
118
132
119
133
class INTERP (Enum ):
134
+ """
135
+ Interpolation method
136
+ """
120
137
NEAREST = (0 )
121
138
LINEAR = (1 )
122
139
BILINEAR = (2 )
123
140
CUBIC = (3 )
124
141
125
142
class PAD (Enum ):
143
+ """
144
+ Edge padding types
145
+ """
126
146
ZERO = (0 )
127
147
SYM = (1 )
128
148
129
149
class CONNECTIVITY (Enum ):
150
+ """
151
+ Neighborhood connectivity
152
+ """
130
153
FOUR = (4 )
131
154
EIGHT = (8 )
132
155
133
156
class CONV_MODE (Enum ):
157
+ """
158
+ Convolution mode
159
+ """
134
160
DEFAULT = (0 )
135
161
EXPAND = (1 )
136
162
137
163
class CONV_DOMAIN (Enum ):
164
+ """
165
+ Convolution domain
166
+ """
138
167
AUTO = (0 )
139
168
SPATIAL = (1 )
140
169
FREQ = (2 )
141
170
142
171
class MATCH (Enum ):
172
+ """
173
+ Match type
174
+ """
175
+
176
+ """
177
+ Sum of absolute differences
178
+ """
143
179
SAD = (0 )
180
+
181
+ """
182
+ Zero mean SAD
183
+ """
144
184
ZSAD = (1 )
185
+
186
+ """
187
+ Locally scaled SAD
188
+ """
145
189
LSAD = (2 )
190
+
191
+ """
192
+ Sum of squared differences
193
+ """
146
194
SSD = (3 )
195
+
196
+ """
197
+ Zero mean SSD
198
+ """
147
199
ZSSD = (4 )
200
+
201
+ """
202
+ Locally scaled SSD
203
+ """
148
204
LSSD = (5 )
205
+
206
+ """
207
+ Normalized cross correlation
208
+ """
149
209
NCC = (6 )
210
+
211
+ """
212
+ Zero mean NCC
213
+ """
150
214
ZNCC = (7 )
215
+
216
+ """
217
+ Sum of hamming distances
218
+ """
151
219
SHD = (8 )
152
220
153
221
class CSPACE (Enum ):
222
+ """
223
+ Colorspace formats
224
+ """
154
225
GRAY = (0 )
155
226
RGB = (1 )
156
227
HSV = (2 )
157
228
158
229
class MATPROP (Enum ):
230
+ """
231
+ Matrix properties
232
+ """
233
+
234
+ """
235
+ None, general.
236
+ """
159
237
NONE = (0 )
238
+
239
+ """
240
+ Transposed.
241
+ """
160
242
TRANS = (1 )
243
+
244
+ """
245
+ Conjugate transposed.
246
+ """
161
247
CTRANS = (2 )
248
+
249
+ """
250
+ Upper triangular matrix.
251
+ """
162
252
UPPER = (32 )
253
+
254
+ """
255
+ Lower triangular matrix.
256
+ """
163
257
LOWER = (64 )
258
+
259
+ """
260
+ Treat diagonal as units.
261
+ """
164
262
DIAG_UNIT = (128 )
263
+
264
+ """
265
+ Symmetric matrix.
266
+ """
165
267
SYM = (512 )
268
+
269
+ """
270
+ Positive definite matrix.
271
+ """
166
272
POSDEF = (1024 )
273
+
274
+ """
275
+ Orthogonal matrix.
276
+ """
167
277
ORTHOG = (2048 )
278
+
279
+ """
280
+ Tri diagonal matrix.
281
+ """
168
282
TRI_DIAG = (4096 )
283
+
284
+ """
285
+ Block diagonal matrix.
286
+ """
169
287
BLOCK_DIAG = (8192 )
170
288
171
289
class NORM (Enum ):
290
+ """
291
+ Norm types
292
+ """
172
293
VECTOR_1 = (0 )
173
294
VECTOR_INF = (1 )
174
295
VECTOR_2 = (2 )
@@ -180,6 +301,9 @@ class NORM(Enum):
180
301
EUCLID = VECTOR_2
181
302
182
303
class COLORMAP (Enum ):
304
+ """
305
+ Colormaps
306
+ """
183
307
DEFAULT = (0 )
184
308
SPECTRUM = (1 )
185
309
COLORS = (2 )
You can’t perform that action at this time.
0 commit comments