xray.Coordinate

class xray.Coordinate(*args, **kwargs)

Subclass of Variable which caches its data as a pandas.Index instead of a numpy.ndarray.

Coordinates must always be 1-dimensional. In addition to Variable methods, they support some pandas.Index methods directly (e.g., get_indexer).

Attributes

T
as_index The variable’s data as a pandas.Index
attributes
attrs Dictionary of local attributes on this variable.
dimensions Tuple of dimension names with which this variable is associated.
dtype
is_monotonic
ndim
shape
size
values The variable’s data as a numpy.ndarray

Methods

all([dimension, axis]) Reduce this Variable’s data’ by applying numpy.all along some dimension(s).
any([dimension, axis]) Reduce this Variable’s data’ by applying numpy.any along some dimension(s).
argmax([dimension, axis]) Reduce this Variable’s data’ by applying numpy.argmax along some dimension(s).
argmin([dimension, axis]) Reduce this Variable’s data’ by applying numpy.argmin along some dimension(s).
argsort(*args, **kwargs)
astype(*args, **kwargs)
clip(*args, **kwargs)
concat(variables[, dimension, indexers, ...]) Concatenate variables along a new or existing dimension.
conj(*args, **kwargs)
conjugate(*args, **kwargs)
copy([deep]) Returns a copy of this object.
equals(other) True if two Variables have the same dimensions and values; otherwise False.
get_axis_num(dimension) Return axis number(s) corresponding to dimension(s) in this array.
get_indexer(label)
get_loc(label)
identical(other) Like equals, but also checks attributes.
indexed(**indexers) Return a new array indexed along the specified dimension(s).
is_numeric()
item() Calls numpy.ndarray.item on this array’s values
max([dimension, axis]) Reduce this Variable’s data’ by applying numpy.max along some dimension(s).
mean([dimension, axis]) Reduce this Variable’s data’ by applying numpy.mean along some dimension(s).
min([dimension, axis]) Reduce this Variable’s data’ by applying numpy.min along some dimension(s).
prod([dimension, axis]) Reduce this Variable’s data’ by applying numpy.prod along some dimension(s).
ptp([dimension, axis]) Reduce this Variable’s data’ by applying numpy.ptp along some dimension(s).
reduce(func[, dimension, axis]) Reduce this array by applying func along some dimension(s).
round(*args, **kwargs)
slice_indexer([start, stop, step])
slice_locs([start, stop])
squeeze([dimension]) Return a new Variable object with squeezed data.
std([dimension, axis]) Reduce this Variable’s data’ by applying numpy.std along some dimension(s).
sum([dimension, axis]) Reduce this Variable’s data’ by applying numpy.sum along some dimension(s).
to_coord() Return this variable as an Coordinate
transpose(*dimensions) Return a new Variable object with transposed dimensions.
var([dimension, axis]) Reduce this Variable’s data’ by applying numpy.var along some dimension(s).
__init__(*args, **kwargs)

Methods

__init__(*args, **kwargs)
all([dimension, axis]) Reduce this Variable’s data’ by applying numpy.all along some dimension(s).
any([dimension, axis]) Reduce this Variable’s data’ by applying numpy.any along some dimension(s).
argmax([dimension, axis]) Reduce this Variable’s data’ by applying numpy.argmax along some dimension(s).
argmin([dimension, axis]) Reduce this Variable’s data’ by applying numpy.argmin along some dimension(s).
argsort(*args, **kwargs)
astype(*args, **kwargs)
clip(*args, **kwargs)
concat(variables[, dimension, indexers, ...]) Concatenate variables along a new or existing dimension.
conj(*args, **kwargs)
conjugate(*args, **kwargs)
copy([deep]) Returns a copy of this object.
equals(other) True if two Variables have the same dimensions and values; otherwise False.
get_axis_num(dimension) Return axis number(s) corresponding to dimension(s) in this array.
get_indexer(label)
get_loc(label)
identical(other) Like equals, but also checks attributes.
indexed(**indexers) Return a new array indexed along the specified dimension(s).
is_numeric()
item() Calls numpy.ndarray.item on this array’s values
max([dimension, axis]) Reduce this Variable’s data’ by applying numpy.max along some dimension(s).
mean([dimension, axis]) Reduce this Variable’s data’ by applying numpy.mean along some dimension(s).
min([dimension, axis]) Reduce this Variable’s data’ by applying numpy.min along some dimension(s).
prod([dimension, axis]) Reduce this Variable’s data’ by applying numpy.prod along some dimension(s).
ptp([dimension, axis]) Reduce this Variable’s data’ by applying numpy.ptp along some dimension(s).
reduce(func[, dimension, axis]) Reduce this array by applying func along some dimension(s).
round(*args, **kwargs)
slice_indexer([start, stop, step])
slice_locs([start, stop])
squeeze([dimension]) Return a new Variable object with squeezed data.
std([dimension, axis]) Reduce this Variable’s data’ by applying numpy.std along some dimension(s).
sum([dimension, axis]) Reduce this Variable’s data’ by applying numpy.sum along some dimension(s).
to_coord() Return this variable as an Coordinate
transpose(*dimensions) Return a new Variable object with transposed dimensions.
var([dimension, axis]) Reduce this Variable’s data’ by applying numpy.var along some dimension(s).

Attributes

T
as_index The variable’s data as a pandas.Index
attributes
attrs Dictionary of local attributes on this variable.
dimensions Tuple of dimension names with which this variable is associated.
dtype
is_monotonic
ndim
shape
size
values The variable’s data as a numpy.ndarray