(
shape: ShapeMap[R], dtype: D = 'float32' as D,
values?: DataTypeMap[D])
| 46 | * @doc {heading: 'Tensors', subheading: 'Creation'} |
| 47 | */ |
| 48 | export function buffer<R extends Rank, D extends DataType = 'float32'>( |
| 49 | shape: ShapeMap[R], dtype: D = 'float32' as D, |
| 50 | values?: DataTypeMap[D]): TensorBuffer<R, D> { |
| 51 | dtype = dtype || 'float32' as D; |
| 52 | util.assertNonNegativeIntegerDimensions(shape); |
| 53 | return new TensorBuffer<R, D>(shape, dtype, values); |
| 54 | } |
no outgoing calls
no test coverage detected
searching dependent graphs…