(shape, dtype)
| 4103 | """ |
| 4104 | |
| 4105 | def fn(shape, dtype): |
| 4106 | base = ( |
| 4107 | torch.rand(shape, dtype=dtype) |
| 4108 | if uniform |
| 4109 | else torch.randn(shape, dtype=dtype) |
| 4110 | ) |
| 4111 | if abs: |
| 4112 | base = base.abs() |
| 4113 | return (base * scale + offset,) |
| 4114 | |
| 4115 | return fn |
| 4116 |
no outgoing calls
no test coverage detected