Skip to content

Commit c8818d1

Browse files
committed
fixing docstring
1 parent 833e71d commit c8818d1

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

src/graphomotor/utils/alphabet_utils.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,28 +19,25 @@ def segment_strokes(
1919
) -> models.Grid:
2020
"""Segment drawing data into strokes and assign them to grid cells.
2121
22-
Groups the data by ``line_number`` to create individual
23-
:class:`~graphomotor.core.models.Stroke` objects. Each stroke is assigned
24-
to a :class:`~graphomotor.core.models.GridCell` based on its centroid
25-
(mean x, mean y). The grid is constructed via
26-
:meth:`~graphomotor.core.models.Grid.from_bbox` with default padding so
27-
that centroids on the outermost edge are captured.
22+
Groups the data by line_number to create individual Stroke objects. Each
23+
stroke is assigned to a GridCell based on its centroid (mean x, mean y).
24+
The grid is constructed via Grid.from_bbox with default padding so that
25+
centroids on the outermost edge are captured.
2826
2927
Args:
30-
data: DataFrame containing drawing data with at least ``line_number``,
31-
``x``, ``y``, and ``seconds`` columns.
28+
data: DataFrame containing drawing data with at least line_number,
29+
x, y, and seconds columns.
3230
x_min: Left boundary of the grid bounding box.
3331
x_max: Right boundary of the grid bounding box.
3432
y_min: Bottom boundary of the grid bounding box.
3533
y_max: Top boundary of the grid bounding box.
3634
n_rows: Number of rows in the grid.
3735
n_cols: Number of columns in the grid.
3836
labels: Optional list of labels for each cell in row-major order.
39-
Must have length ``n_rows * n_cols`` if provided.
37+
Must have length n_rows * n_cols if provided.
4038
4139
Returns:
42-
A :class:`~graphomotor.core.models.Grid` populated with strokes
43-
assigned to their matching cells.
40+
A Grid populated with strokes assigned to their matching cells.
4441
"""
4542
grid = models.Grid.from_bbox(
4643
x_min=x_min,

0 commit comments

Comments
 (0)