license import { TensorBuffer } from '../tensor' ; import { DataType , DataTypeMap , Rank , ShapeMap } from '../types' ; import * as util from '../util' ; param shape param dtype param values doc export function buffer < R extends Rank , D extends DataType = 'float32' > ( shape , dtype = 'float32' as D , values ? ) { dtype = dtype || 'float32' as D ; util . assertNonNegativeIntegerDimensions ( shape ) ; return new TensorBuffer < R , D > ( shape , dtype , values ) ; }