torch.get_dtype_info
function get_dtype_info(name: string): DTypeInfo | undefinedGet detailed information about a dtype.
Parameters
namestring- The dtype name
Returns
DTypeInfo | undefined– Dtype info or undefined if not foundExamples
// Built-in dtype
const f32 = torch.library.get_dtype_info('float32');
// { name: 'float32', components: 1, componentType: 'float32', isBuiltin: true, ... }
// Custom dtype
const quat = torch.library.get_dtype_info('quaternion_f32');
// { name: 'quaternion_f32', components: 4, componentType: 'float32',
// componentNames: ['w', 'x', 'y', 'z'], isBuiltin: false, ... }