We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 62fe166 + 340e075 commit 0d39b87Copy full SHA for 0d39b87
pyttb/tensor.py
@@ -2959,8 +2959,7 @@ def tenrand(shape: Shape, order: MemoryLayout = "F") -> tensor:
2959
# Typing doesn't play nice with partial
2960
# mypy issue: 1484
2961
def unit_uniform(pass_through_shape: Tuple[int, ...]) -> np.ndarray:
2962
- data = np.random.uniform(low=0, high=1, size=pass_through_shape)
2963
- to_memory_order(data, order)
+ data = np.random.uniform(low=0, high=1, size=np.prod(pass_through_shape))
2964
return data
2965
2966
return tensor.from_function(unit_uniform, shape)
0 commit comments