iarray¶
-
class
minkit.
iarray
(array, length=None, backend=None)[source]¶ Bases:
minkit.marray
Array of integers.
- Parameters
array (numpy.ndarray or reikna.cluda.api.Array) – original array.
backend – backend where to put the array.
- Tye backend
Backend
Attributes Summary
Associated object to do array operations.
Backend interface.
Data type.
Length as a
numpy.int32
instance.Shape of the array.
Underlying array.
Methods Summary
Return the underlying array as a
numpy.ndarray
instance.copy
()Copy this array.
from_ndarray
(a, backend)Create this class from a
numpy.ndarray
instance.get
(i)Get an element of the array.
to_backend
(backend)Send the array to the given backend.
Attributes Documentation
-
aop
¶ Associated object to do array operations.
-
backend
¶ Backend interface.
-
dtype
¶ Data type.
-
length
¶ Length as a
numpy.int32
instance.
-
shape
¶ Shape of the array.
-
ua
¶ Underlying array.
Methods Documentation
-
as_ndarray
()¶ Return the underlying array as a
numpy.ndarray
instance. If the underlying array is already of this type, no copy is done.- Returns
underlying array as a
numpy.ndarray
.- Return type
-
copy
()¶ Copy this array.
- Returns
Copy of this array.
-
classmethod
from_ndarray
(a, backend)[source]¶ Create this class from a
numpy.ndarray
instance.- Parameters
a (numpy.ndarray) – array.
backend (Backend) – backend where to create this array.
- Returns
Newly created array.
-
get
(i)¶ Get an element of the array. The output type depends on the type of array.