earthkit.data.utils.factorise

Classes

Column

Just what is says on the tin, a column of values.

Interval

Table

Tree

Functions

factorise(req, *[, intervals])

Module Contents

class earthkit.data.utils.factorise.Column(title, values)

Bases: object

Just what is says on the tin, a column of values.

compute_differences(idx)

Number of unique values in this column for the requested row indexes.

@param idx list of row indexes

diff = -1
prio = 0
set_value(i, v)
title
value(i)
values
class earthkit.data.utils.factorise.Interval(start, end)

Bases: object

count()
end
classmethod expand(lst)
classmethod intersection(list1, list2)
intersects(other)

Returns the intersection of two intervals if they overlap, else None.

classmethod join(intervals)
overlaps(other)

Returns the union of two intervals if they overlap, else None.

split(dates)
start
class earthkit.data.utils.factorise.Table(other=None, a=None, b=None)

Bases: object

column(s, col)
compare_rows(a, b)
compare_values(sa, sb)
factorise1()
factorise2(n)
get_elem(c, r)
one_less(r, n)
pop_singles()

Take the column with just one unique value and add them to the tree. Delete their index from the list of column indexes.

process()
set_elem(c, r, v)
sort_columns()

Sort the columns on the number of unique values (this column.diff).

sort_rows()
split()
tree
class earthkit.data.utils.factorise.Tree(values=None, intervals=None)
as_mars(verb='retrieve', extra=None)
as_mars_list()
compact()
count(_kwargs=None, **kwargs)
factorise()
flatten()
iterate(expand=False)
missing(**kwargs)
select(**kwargs)
to_list()
tree()
unique_values()
visit(visitor, depth=0)
earthkit.data.utils.factorise.factorise(req, *, intervals=None)