Skip to content

Commit

Permalink
Deployed fc36813 to master with MkDocs 1.5.3 and mike 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 12, 2024
1 parent 5427086 commit 885574c
Show file tree
Hide file tree
Showing 9 changed files with 400 additions and 88 deletions.
2 changes: 1 addition & 1 deletion latest
Binary file modified master/objects.inv
Binary file not shown.
348 changes: 326 additions & 22 deletions master/reference/redux/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion master/search/search_index.json

Large diffs are not rendered by default.

58 changes: 29 additions & 29 deletions master/sitemap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,147 +2,147 @@
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://root-11.github.io/tablite/master/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/benchmarks/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/changelog/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/tutorial/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/base/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/config/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/core/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/datasets/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/datatypes/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/diff/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/export_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/file_reader_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/groupby_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/import_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/imputation/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/joins/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/lookup/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/match/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/merge/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/mp_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/nimlite/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/pivots/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/redux/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/reindex/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/sort_utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/sortation/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/tools/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/utils/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
<url>
<loc>https://root-11.github.io/tablite/master/reference/version/</loc>
<lastmod>2024-04-10</lastmod>
<lastmod>2024-04-12</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Binary file modified master/sitemap.xml.gz
Binary file not shown.
68 changes: 38 additions & 30 deletions master/tablite/redux.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def _compress_one(T, mask):
return new


def _compress_both(T, mask, pbar: _tqdm):
def compress_both(T, mask, pbar: _tqdm):
# NOTE FOR DEVELOPERS:
# np.compress is so fast that the overhead of multiprocessing doesn't pay off.
cls = type(T)
Expand All @@ -161,30 +161,12 @@ def _compress_both(T, mask, pbar: _tqdm):
data = T[name][start:end]
true_col.extend(np.compress(mask[start:end], data))
false_col.extend(np.compress(np.invert(mask)[start:end], data))
pbar.update(pbar_step)
if pbar is not None:
pbar.update(pbar_step)
return true, false

def _filter_using_list_of_dicts(T, expressions, filter_type, pbar: _tqdm):
"""
enables filtering across columns for multiple criteria.
expressions:
str: Expression that can be compiled and executed row by row.
exampLe: "all((A==B and C!=4 and 200<D))"
list of dicts: (example):

L = [
{'column1':'A', 'criteria': "==", 'column2': 'B'},
{'column1':'C', 'criteria': "!=", "value2": '4'},
{'value1': 200, 'criteria': "<", column2: 'D' }
]
accepted dictionary keys: 'column1', 'column2', 'criteria', 'value1', 'value2'
filter_type: 'all' or 'any'
"""
def get_filter_bitmap(T, expressions, pbar: _tqdm):
for expression in expressions:
if not isinstance(expression, dict):
raise TypeError(f"invalid expression: {expression}")
Expand Down Expand Up @@ -213,11 +195,6 @@ def _filter_using_list_of_dicts(T, expressions, filter_type, pbar: _tqdm):
if v2 is not None and c2 is not None:
raise ValueError("filter can only take 1 right expression element. Got 2.")

if not isinstance(filter_type, str):
raise TypeError()
if filter_type not in {"all", "any"}:
raise ValueError(f"filter_type: {filter_type} not in ['all', 'any']")

# EVALUATION....
# 1. setup a rectangular bitmap for evaluations
bitmap = np.empty(shape=(len(expressions), len(T)), dtype=bool)
Expand Down Expand Up @@ -277,7 +254,38 @@ def safe_test(f, a, b):
assert callable(f)
result = list_to_np_array([safe_test(f, a, b) for a, b in zip(dset_A, dset_B)])
bitmap[bit_index, start:end] = result
pbar.update(pbar_step)
if pbar is not None:
pbar.update(pbar_step)

return bitmap

def _filter_using_list_of_dicts(T, expressions, filter_type, pbar: _tqdm):
"""
enables filtering across columns for multiple criteria.
expressions:
str: Expression that can be compiled and executed row by row.
exampLe: "all((A==B and C!=4 and 200<D))"
list of dicts: (example):
L = [
{'column1':'A', 'criteria': "==", 'column2': 'B'},
{'column1':'C', 'criteria': "!=", "value2": '4'},
{'value1': 200, 'criteria': "<", column2: 'D' }
]
accepted dictionary keys: 'column1', 'column2', 'criteria', 'value1', 'value2'
filter_type: 'all' or 'any'
"""
if not isinstance(filter_type, str):
raise TypeError()
if filter_type not in {"all", "any"}:
raise ValueError(f"filter_type: {filter_type} not in ['all', 'any']")

bitmap = get_filter_bitmap(T, expressions, pbar)

f = np.all if filter_type == "all" else np.any
mask = f(bitmap, axis=0)
Expand Down Expand Up @@ -334,7 +342,7 @@ def _f(A,B,C,D):
else:
raise TypeError
# create new tables
res = _compress_both(T, mask, pbar=pbar)
res = compress_both(T, mask, pbar=pbar)
pbar.update(pbar.total - pbar.n)

return res
Expand Down Expand Up @@ -381,7 +389,7 @@ def _f(A,B,C,D):
# TODO: make parser for expressions and use the nim implement
mask = _filter_using_expression(T, expressions)
pbar.update(10)
res = _compress_both(T, mask, pbar=pbar)
res = compress_both(T, mask, pbar=pbar)
pbar.update(pbar.total - pbar.n)
elif isinstance(expressions, list):
return _filter_using_list_of_dicts_native(T, expressions, filter_type, tqdm)
Expand Down
2 changes: 1 addition & 1 deletion master/tablite/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
major, minor, patch = 2023, 11, 2
major, minor, patch = 2023, 11, 3
__version_info__ = (major, minor, patch)
__version__ = ".".join(str(i) for i in __version_info__)
8 changes: 4 additions & 4 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
{
"version": "master",
"title": "master",
"aliases": []
"aliases": [
"latest"
]
},
{
"version": "2023.11.2",
"title": "2023.11.2",
"aliases": [
"latest"
]
"aliases": []
},
{
"version": "2023.11.1",
Expand Down

0 comments on commit 885574c

Please sign in to comment.