Class NumPy
java.lang.Object
io.deephaven.integrations.learn.gather.NumPy
Gatherer takes Deephaven columnar data and places it into a buffer to be used by Python. The Python object will take
data from the buffer and use it to construct a 2d array of specified size.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean[]
tensorBuffer2DBoolean
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of Booleans.static byte[]
tensorBuffer2DByte
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of Bytes.static double[]
tensorBuffer2DDouble
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of doubles.static float[]
tensorBuffer2DFloat
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of floats.static int[]
tensorBuffer2DInt
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of ints.static long[]
tensorBuffer2DLong
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of longs.static short[]
tensorBuffer2DShort
(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of shorts.
-
Constructor Details
-
NumPy
public NumPy()
-
-
Method Details
-
tensorBuffer2DBoolean
public static boolean[] tensorBuffer2DBoolean(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of Booleans.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DByte
public static byte[] tensorBuffer2DByte(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of Bytes.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DShort
public static short[] tensorBuffer2DShort(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of shorts.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DInt
public static int[] tensorBuffer2DInt(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of ints.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DLong
public static long[] tensorBuffer2DLong(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of longs.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DFloat
public static float[] tensorBuffer2DFloat(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of floats.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-
tensorBuffer2DDouble
public static double[] tensorBuffer2DDouble(RowSequence rowSeq, ColumnSource<?>[] columnSources, boolean columnMajorOrder) Copy data from a table into a 2d tensor of doubles.- Parameters:
rowSeq
- indices of the rows of the table to put into the tensorcolumnSources
- columns of data to put into the tensorcolumnMajorOrder
- true to return a column-major array; false to return a row-major array- Returns:
- contiguous RAM allocated for the tensor
-