NumpyTensor¶
- class odl.space.npy_tensors.NumpyTensor(space, data)[source]¶
Bases:
TensorRepresentation of a
NumpyTensorSpaceelement.- Attributes:
TThis element's transpose, i.e.
dataThe
numpy.ndarrayrepresenting the data ofself.data_ptrA raw pointer to the data container of
self.dtypeData type of each entry.
imagImaginary part of
self.implName of the implementation back-end of this tensor.
itemsizeSize in bytes of one tensor entry.
nbytesTotal number of bytes in memory occupied by this tensor.
ndimNumber of axes (=dimensions) of this tensor.
realReal part of
self.shapeNumber of elements per axis.
sizeTotal number of entries.
spaceSpace to which this element belongs.
ufuncsAccess to Numpy style universal functions.
Methods
asarray([out])Extract the data of this array as a
numpy.ndarray.assign(other)Assign the values of
othertoself.astype(dtype)Return a copy of this element with new
dtype.conj([out])Return the complex conjugate of
self.copy()Return an identical (deep) copy of this tensor.
dist(other)Return the distance of
selftoother.divide(other[, out])Return
out = self / other.inner(other)Return the inner product of
selfandother.lincomb(a, x1[, b, x2])Implement
self[:] = a * x1 + b * x2.multiply(other[, out])Return
out = self * other.norm()Return the norm of this element.
set_zero()Set this element to zero.
show([title, method, indices, force_show, fig])Display the function graphically.