We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b6a649d + 2a270fa commit 011cae4Copy full SHA for 011cae4
1 file changed
src/ntops/kernels/element_wise.py
@@ -1,12 +1,12 @@
1
import ninetoothed
2
3
4
-def arrangement(*tensors):
+def arrangement(*tensors, block_size=ninetoothed.block_size()):
5
ndim = max(tensor.ndim for tensor in tensors)
6
7
assert all(tensor.ndim == ndim or tensor.ndim == 0 for tensor in tensors)
8
9
- block_shape = tuple(1 for _ in range(ndim - 1)) + (ninetoothed.block_size(),)
+ block_shape = tuple(1 for _ in range(ndim - 1)) + (block_size,)
10
11
return tuple(
12
tensor.tile(block_shape) if tensor.ndim != 0 else tensor for tensor in tensors
0 commit comments