Skip to content
Snippets Groups Projects
Commit 7cfd24c7 authored by Alán Muñoz's avatar Alán Muñoz
Browse files

docs(tiler): Add typing and default values

parent 33e9c9f2
No related branches found
No related tags found
No related merge requests found
...@@ -123,7 +123,11 @@ class TrapLocations: ...@@ -123,7 +123,11 @@ class TrapLocations:
""" """
def __init__( def __init__(
self, initial_location, tile_size, max_size=1200, drifts=None self,
initial_location: np.array,
tile_size: int = None,
max_size: int = 1200,
drifts: np.array = None,
): ):
if drifts is None: if drifts is None:
drifts = [] drifts = []
...@@ -179,7 +183,9 @@ class TrapLocations: ...@@ -179,7 +183,9 @@ class TrapLocations:
return res return res
@classmethod @classmethod
def from_tiler_init(cls, initial_location, tile_size, max_size=1200): def from_tiler_init(
cls, initial_location, tile_size: int = None, max_size: int = 1200
):
""" """
Instantiate class from an instance of the Tiler class Instantiate class from an instance of the Tiler class
""" """
...@@ -354,9 +360,9 @@ class Tiler(ProcessABC): ...@@ -354,9 +360,9 @@ class Tiler(ProcessABC):
""" """
return len(self.trap_locs) return len(self.trap_locs)
def initialise_traps(self, tile_size): def initialise_traps(self, tile_size: int = None):
""" """
Find initial trap positions. Find initial trap positions if they have not been initialised.
Removes all those that are too close to the edge so no padding Removes all those that are too close to the edge so no padding
is necessary. is necessary.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment