UnstructuredCoords

class hcipy.field.UnstructuredCoords(coords)

Bases: hcipy.field.coordinates.Coords

An unstructured list of points.

Parameters
coordslist or tuple

A tuple of a list of positions for each dimension.

Attributes Summary

size

The number of points.

Methods Summary

from_dict(tree)

Make an UnstructuredCoords from a dictionary, previously created by to_dict().

reverse(self)

Reverse the ordering of points in-place.

to_dict(self)

Convert the object to a dictionary for serialization.

Attributes Documentation

size

The number of points.

Methods Documentation

classmethod from_dict(tree)

Make an UnstructuredCoords from a dictionary, previously created by to_dict().

Parameters
treedictionary

The dictionary from which to make a new UnstructuredCoords object.

Returns
UnstructuredCoords

The created object.

Raises
ValueError

If the dictionary is not formatted correctly.

reverse(self)

Reverse the ordering of points in-place.

to_dict(self)

Convert the object to a dictionary for serialization.

Returns
dictionary

The created dictionary.