Object3d#

class orix.base.Object3d(data=None)[source]#

Bases: object

Base class for 3d objects.

Note

This class is not meant to be used directly.

Parameters:
data

Object data.

Attributes

Object3d.data

Return the object data.

Object3d.dim

Return the number of dimensions for this object.

Object3d.ndim

Return the number of navigation dimensions of the instance.

Object3d.norm

Return the norm of the data.

Object3d.shape

Return the shape of the object.

Object3d.size

Return the total number of entries in this object.

Object3d.unit

Return the unit object.

Methods

Object3d.empty()

Return an empty object with the appropriate dimensions.

Object3d.flatten()

Return a new object with the same data in a single column.

Object3d.get_random_sample([size, replace, ...])

Return a random sample of a given size in a flattened instance.

Object3d.reshape(*shape)

Return a new object containing the same data with a new shape.

Object3d.squeeze()

Return a new object with length one dimensions removed.

Object3d.stack(sequence)

Return a stacked object from the sequence.

Object3d.transpose(*axes)

Return a new object containing the same data transposed.

Object3d.unique([return_index, return_inverse])

Return a new object containing only this object's unique entries.

Examples using Object3d#