XY#

class lsst.images.XY(x: T, y: T)#

Bases: NamedTuple, Generic

A pair of per-dimension objects, ordered (x, y).

Notes#

XY is used for points and other 2-d pairs when the most natural ordering is (x, y). Because it is a tuple, however, arithmetic operations behave as they would on a collections.abc.Sequence, not a mathematical vector (e.g. adding concatenates).

See Also#

YX

Attributes Summary

x

The x / column object.

y

The y / row object.

yx

A tuple of the same objects in the opposite order.

Methods Summary

count(value, /)

Return number of occurrences of value.

index(value[, start, stop])

Return first index of value.

map(func)

Apply a function to both objects.

Attributes Documentation

x: T#

The x / column object.

y: T#

The y / row object.

yx#

A tuple of the same objects in the opposite order.

Methods Documentation

count(value, /)#

Return number of occurrences of value.

index(value, start=0, stop=9223372036854775807, /)#

Return first index of value.

Raises ValueError if the value is not present.

map(func: Callable[[T], U]) XY#

Apply a function to both objects.