Interface PyValue

All Known Implementing Classes:
PyValue.Array, PyValue.Frame, PyValue.None, PyValue.Other, PyValue.PyDict, PyValue.PyList, PyValue.Str

A value exchanged with Python. Numbers are numpy arrays in Python (Python lists or the array module if numpy isn't installed): The data of an array is kept in row-major (C) order as in numpy.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A numeric or boolean array.
    static final record 
    A table (a pandas DataFrame): the columns by name (each an Array or Str) and the row labels (null for the default 0..n-1).
    static final record 
    None.
    static final record 
    Any other object: its type and repr (not transferable).
    static final record 
    A dict (the keys as strings, in their order).
    static final record 
    A list or tuple.
    static final record 
    Strings (null elements are None in Python).
  • Method Summary

    Modifier and Type
    Method
    Description
    array(Object data, String dtype, int... shape)
    An array with a shape (the data in row-major order, not copied).
    int
    The number of elements.
    matrix(double[][] rows)
    A 2-d float64 array from rows (all rows must have the same length).
    of(boolean... values)
     
    of(double... values)
     
    of(int... values)
     
    of(long... values)
     
    of(String... values)
     
    ofUnsigned(byte... values)
    Unsigned bytes (uint8, e.g., 8-bit image data).
    scalar(double value)
    A scalar float.
  • Method Details

    • length

      int length()
      The number of elements.
    • of

      static PyValue.Array of(double... values)
    • of

      static PyValue.Array of(int... values)
    • of

      static PyValue.Array of(long... values)
    • of

      static PyValue.Array of(boolean... values)
    • ofUnsigned

      static PyValue.Array ofUnsigned(byte... values)
      Unsigned bytes (uint8, e.g., 8-bit image data).
    • of

      static PyValue.Str of(String... values)
    • scalar

      static PyValue.Array scalar(double value)
      A scalar float.
    • matrix

      static PyValue.Array matrix(double[][] rows)
      A 2-d float64 array from rows (all rows must have the same length).
    • array

      static PyValue.Array array(Object data, String dtype, int... shape)
      An array with a shape (the data in row-major order, not copied).