Skip to content

Commit

Permalink
fix(mosaic): update doc strings
Browse files Browse the repository at this point in the history
  • Loading branch information
loiccoyle committed Jun 24, 2024
1 parent 41feff5 commit e24e86d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion phomo/mosaic.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ def __init__(
>>> pool = Pool.from_dir("tiles")
>>> master = Master.from_file("master.png")
>>> Mosaic(master, pool, n_appearances=1).build()
>>> mosaic = Mosaic(master, pool, n_appearances=1)
>>> mosaic.build(mosaic.d_matrix())
"""
self._log = logging.getLogger(__name__)
self.master = master
Expand Down Expand Up @@ -285,6 +286,15 @@ def build(self, d_matrix: np.ndarray) -> Image.Image:
Returns:
The PIL.Image instance of the mosaic.
Examples:
Building a mosaic.
>>> mosaic.build(mosaic.d_matrix())
On a GPU.
>>> mosaic.build(mosaic.d_matrix_cuda())
"""
mosaic = np.zeros((self.size[1], self.size[0], 3))

Expand Down

0 comments on commit e24e86d

Please sign in to comment.