Tensor

class odl.space.base_tensors.Tensor(space)[source]

Bases: LinearSpaceElement

Abstract class for representation of TensorSpace elements.

Attributes:
T

This element's transpose, i.e.

dtype

Data type of each entry.

impl

Name of the implementation back-end of this tensor.

itemsize

Size in bytes of one tensor entry.

nbytes

Total number of bytes in memory occupied by this tensor.

ndim

Number of axes (=dimensions) of this tensor.

shape

Number of elements per axis.

size

Total number of entries.

space

Space to which this element belongs.

ufuncs

Access to Numpy style universal functions.

Methods

asarray([out])

Extract the data of this tensor as a Numpy array.

assign(other)

Assign the values of other to self.

astype(dtype)

Return a copy of this element with new dtype.

copy()

Create an identical (deep) copy of self.

dist(other)

Return the distance of self to other.

divide(other[, out])

Return out = self / other.

inner(other)

Return the inner product of self and other.

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.

__init__(space)

Initialize a new instance.

All deriving classes must call this method to set the space property.