Home
Overview
Fundamentals
Glossary
Cheatsheet
API Reference
Quick Recipes
Deep Dive
Common Pitfalls and Gotchas
Persistent Storage
Operators that compare DataSlices.
kd.comparison.equal(x, y)Aliases:
Returns present iff `x` and `y` are equal.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` and `y` are equal. Returns `kd.present` for equal items and
`kd.missing` in other cases.
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.full_equal(x, y)Aliases:
Returns `kd.present` iff all items in `x` and `y` are equal.
The result is a scalar mask. In case of incompatible schemas / dimensions,
the result is `kd.missing`.
Note that the behavior is different from `kd.all(x == y)`, which will return
`kd.missing` if `x` or `y` contain any missing values.
For example,
kd.full_equal(kd.slice([1, 2, 3]), kd.slice([1, 2, 3])) -> kd.present
kd.full_equal(kd.slice([1, 2, 3]), kd.slice([1, 2, None])) -> kd.missing
kd.full_equal(kd.slice([1, 2, None]), kd.slice([1, 2, None])) -> kd.present
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.greater(x, y)Aliases:
Returns present iff `x` is greater than `y`.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` is greater than `y`. Returns `kd.present` when `x` is greater and
`kd.missing` when `x` is less than or equal to `y`.
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.greater_equal(x, y)Aliases:
Returns present iff `x` is greater than or equal to `y`.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` is greater than or equal to `y`. Returns `kd.present` when `x` is
greater than or equal to `y` and `kd.missing` when `x` is less than `y`.
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.less(x, y)Aliases:
Returns present iff `x` is less than `y`.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` is less than `y`. Returns `kd.present` when `x` is less and
`kd.missing` when `x` is greater than or equal to `y`.
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.less_equal(x, y)Aliases:
Returns present iff `x` is less than or equal to `y`.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` is less than or equal to `y`. Returns `kd.present` when `x` is
less than or equal to `y` and `kd.missing` when `x` is greater than `y`.
Args:
x: DataSlice.
y: DataSlice.
kd.comparison.not_equal(x, y)Aliases:
Returns present iff `x` and `y` are not equal.
Pointwise operator which takes a DataSlice and returns a MASK indicating
iff `x` and `y` are not equal. Returns `kd.present` for not equal items and
`kd.missing` in other cases.
Args:
x: DataSlice.
y: DataSlice.