data_shape_from_type

omni.graph.core.data_shape_from_type(attribute_type: Type, is_gathered: bool = False) tuple[omni.graph.core._impl.dtypes.Dtype, None | int | tuple[int, int] | tuple[tuple[int, int]] | tuple[tuple[int, int], int] | tuple[int, int, int] | tuple[int, int, tuple[int, int]]]

Return the dtype,shape information that corresponds to the given attribute type. For easy testing gather sizes are set to 2 items and array sizes are set to 0 elements. e.g. a gathered bool[] would return a shape of ((0, 0))

Parameters
  • attribute_type – Type from which to infer the shape

  • is_gathered – Is the data shape for an array of the attribute type?

Returns

Data type and shape corresponding to the attribute type

Return type

(Dtype, DataWrapperShapeTypes)