Skip to content

Commit efde300

Browse files
committed
add itertools and tolerance to the docs
1 parent efca7db commit efde300

File tree

3 files changed

+42
-1
lines changed

3 files changed

+42
-1
lines changed

docs/api/compas.itertools.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
********************************************************************************
2+
compas.itertools
3+
********************************************************************************
4+
5+
.. currentmodule:: compas.itertools
6+
7+
.. rst-class:: lead
8+
9+
This package defines useful functions for working with iterable objects.
10+
11+
12+
Functions
13+
=========
14+
15+
.. autosummary::
16+
:toctree: generated/
17+
:nosignatures:
18+
19+
normalize_values
20+
remap_values
21+
meshgrid
22+
linspace
23+
flatten
24+
reshape
25+
pairwise
26+
window
27+
iterable_like

docs/api/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ and can be used independently of CAD systems in any environment that supports Py
2121
compas.datastructures
2222
compas.files
2323
compas.geometry
24+
compas.itertools
2425
compas.plugins
2526
compas.rpc
2627
compas.scene
28+
compas.tolerance
2729

2830

2931
compas_blender

src/compas/itertools.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,19 @@
1414
try:
1515
from itertools import zip_longest
1616
except ImportError:
17-
from itertools import izip_longest as zip_longest
17+
from itertools import izip_longest as zip_longest # type: ignore
18+
19+
__all__ = [
20+
"normalize_values",
21+
"remap_values",
22+
"meshgrid",
23+
"linspace",
24+
"flatten",
25+
"reshape",
26+
"pairwise",
27+
"window",
28+
"iterable_like",
29+
]
1830

1931

2032
def normalize_values(values, new_min=0.0, new_max=1.0):

0 commit comments

Comments
 (0)