Class IDXDataSource.IDXData
java.lang.Object
org.tribuo.datasource.IDXDataSource.IDXData
- Enclosing class:
IDXDataSource<T extends Output<T>>
Java side representation for an IDX file.
-
Method Summary
Modifier and TypeMethodDescriptionstatic IDXDataSource.IDXDatacreateIDXData(IDXDataSource.IDXType dataType, int[] shape, double[] data) Constructs an IDXData, validating the input and defensively copying it.voidWrites out this IDXData to the specified path.
-
Method Details
-
createIDXData
public static IDXDataSource.IDXData createIDXData(IDXDataSource.IDXType dataType, int[] shape, double[] data) Constructs an IDXData, validating the input and defensively copying it.- Parameters:
dataType- The data type.shape- The tensor shape.data- The data to write.- Returns:
- An IDXData.
-
save
Writes out this IDXData to the specified path.- Parameters:
outputPath- The path to write to.gzip- If true, gzip the output.- Throws:
IOException- If the write failed.
-