Skip to content

Commit

Permalink
perf: ⚡️ Improve array size increase.
Browse files Browse the repository at this point in the history
  • Loading branch information
rhoadesScholar committed May 10, 2024
1 parent e92fd3c commit d114934
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/leibnetz/leibnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,12 +313,12 @@ def is_valid_input_shape(self, input_key, input_shape):
== 0
).all()

def step_up_size(self, steps: int = 1):
def step_up_size(self, steps: int = 1, step_size: int = 1):
for n in range(steps):
target_arrays = {}
for name, metadata in self.output_shapes.items():
target_arrays[name] = tuple(
(tuple(s + 1 for s in metadata["shape"]), metadata["scale"])
(tuple(s + step_size for s in metadata["shape"]), metadata["scale"])
)
self.compute_shapes(target_arrays, set=True)

Expand Down

0 comments on commit d114934

Please sign in to comment.