Index and Seq classes used in indexing operations.
arrayfire.index.
Index
(idx)[source]¶
Bases: _ctypes.Structure
Structure/Union member
Structure/Union member
Structure/Union member
idx
¶
Structure/Union member
isBatch
¶
Structure/Union member
isSeq
¶
Structure/Union member
arrayfire.index.
ParallelRange
(start, stop=None, step=None)[source]¶
Bases: arrayfire.index.Seq
Class used to parallelize for loop.
Inherits from Seq.
Beginning of parallel range.
End of parallel range.
Step size for parallel range.
Examples
>>> import arrayfire as af >>> a = af.randu(3, 3) >>> b = af.randu(3, 1) >>> c = af.constant(0, 3, 3) >>> for ii in af.ParallelRange(3): ... c[:, ii] = a[:, ii] + b ... >>> af.display(a) [3 3 1 1] 0.4107 0.1794 0.3775 0.8224 0.4198 0.3027 0.9518 0.0081 0.6456
>>> af.display(b) [3 1 1 1] 0.7269 0.7104 0.5201
>>> af.display(c) [3 3 1 1] 1.1377 0.9063 1.1045 1.5328 1.1302 1.0131 1.4719 0.5282 1.1657
Methods
next
()
Function called by the iterator in Python 2
next
()[source]¶
Function called by the iterator in Python 2
arrayfire.index.
Seq
(S)[source]¶
Bases: _ctypes.Structure
arrayfire equivalent of slice
Start of the sequence.
End of sequence.
Step size.
begin
¶
Structure/Union member
end
¶
Structure/Union member
step
¶
Structure/Union member
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4