Creates a tensor with the given shape, filled with random values from a normal distribution with mean `0` and standard deviation `1`. If `dtype` is not specified, the default type is used. You can pass in the `device` keyword argument to control device of the tensor. Additionally,
(*shape, dtype:DTypeLike|None=None, **kwargs)
| 651 | |
| 652 | @staticmethod |
| 653 | def randn(*shape, dtype:DTypeLike|None=None, **kwargs) -> Tensor: |
| 654 | """ |
| 655 | Creates a tensor with the given shape, filled with random values from a normal distribution with mean `0` and standard deviation `1`. |
| 656 | If `dtype` is not specified, the default type is used. |
| 657 | |
| 658 | You can pass in the `device` keyword argument to control device of the tensor. |
| 659 | Additionally, all other keyword arguments are passed to the constructor of the tensor. |
| 660 | |
| 661 | ```python exec="true" source="above" session="tensor" result="python" |
| 662 | Tensor.manual_seed(42) |
| 663 | print(Tensor.randn(2, 3).numpy()) |
| 664 | ``` |
| 665 | """ |
| 666 | return Tensor.empty(*shape, **kwargs).randn_like(dtype=dtype) |
| 667 | |
| 668 | @staticmethod |
| 669 | def randint(*shape, low=0, high=10, dtype=dtypes.int32, **kwargs) -> Tensor: |