Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ntops/kernels/element_wise.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import ninetoothed


def arrangement(*tensors):
def arrangement(*tensors, block_size=ninetoothed.block_size()):
ndim = max(tensor.ndim for tensor in tensors)

assert all(tensor.ndim == ndim or tensor.ndim == 0 for tensor in tensors)

block_shape = tuple(1 for _ in range(ndim - 1)) + (ninetoothed.block_size(),)
block_shape = tuple(1 for _ in range(ndim - 1)) + (block_size,)

return tuple(
tensor.tile(block_shape) if tensor.ndim != 0 else tensor for tensor in tensors
Expand Down