deephaven.npy¶
Deephaven NumPy utilities.
-
numpy_sample
(t, nRow, dtype=<class 'numpy.float64'>, rows=None, imageWidth=None, imageHeight=None, imageResize=True, imageColor=None)¶ Randomly sample rows from a a table or tables into numpy arrays.
- Parameters
t – table or list of tables
rowStart – first row of the slice
dtype – numpy datatype or array of numpy datatypes to generate from the table(s)
rows – row indices to produce the sample. None randomly selects rows.
imageWidth – width of the output image in pixels.
imageHeight – height of the output image in pixels.
imageResize – True to resize images; False otherwise.
imageColor – True to return color images; False to return gray-scale images.
- Returns
numpy data sampled from the input tables. Scalar if one input table or tuple if input table list.
-
numpy_slice
(t, rowStart, nRow, dtype=<class 'numpy.float64'>, imageWidth=None, imageHeight=None, imageResize=True, imageColor=None)¶ Convert a table or tables into numpy arrays.
- Parameters
t – table or list of tables
rowStart – first row of the slice
nRow – number of rows in the slice
dtype – numpy datatype or array of numpy datatypes to generate from the table(s)
imageWidth – width of the output image in pixels.
imageHeight – height of the output image in pixels.
imageResize – True to resize images; False otherwise.
imageColor – True to return color images; False to return gray-scale images.
- Returns
numpy data sampled from the input tables. Scalar if one input table or tuple if input table list.