Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mieskolainen committed Aug 1, 2024
1 parent 42af3a9 commit 1f69920
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions icenet/tools/aux.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ def recursive_concatenate(array_list, max_batch_size: int=32, axis: int=0):
# Split the list into two halves and recursively concatenate each half
else:
mid = (n + 1) // 2 # handle odd length
left = recursive_concatenate(array_list[:mid], max_bath_size=max_batch_size, axis=axis)
right = recursive_concatenate(array_list[mid:], max_bath_size=max_batch_size, axis=axis)
left = recursive_concatenate(array_list[:mid], max_batch_size=max_batch_size, axis=axis)
right = recursive_concatenate(array_list[mid:], max_batch_size=max_batch_size, axis=axis)
if isinstance(left, ak.Array) or isinstance(right, ak.Array):
return ak.concatenate([left, right], axis=axis)
else:
Expand Down
6 changes: 3 additions & 3 deletions icenet/tools/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,9 +449,9 @@ def concatenate_data(data, max_batch_size: int=32):
print('Executing array concatenation ...')
tic = time.time()

X = aux.recursive_concatenate(X_all, axis=0, max_batch_size=max_batch_size)
Y = aux.recursive_concatenate(Y_all, axis=0, max_batch_size=max_batch_size)
W = aux.recursive_concatenate(W_all, axis=0, max_batch_size=max_batch_size)
X = aux.recursive_concatenate(X_all, max_batch_size=max_batch_size, axis=0)
Y = aux.recursive_concatenate(Y_all, max_batch_size=max_batch_size, axis=0)
W = aux.recursive_concatenate(W_all, max_batch_size=max_batch_size, axis=0)

N_final = len(X)

Expand Down

0 comments on commit 1f69920

Please sign in to comment.