java.lang.Object
io.deephaven.integrations.learn.gather.NumPy

public class NumPy extends Object
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 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - 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 tensor
      columnSources - columns of data to put into the tensor
      columnMajorOrder - true to return a column-major array; false to return a row-major array
      Returns:
      contiguous RAM allocated for the tensor