Class Java2NumpyCopy
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyImageRand(Table t, double[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array.static voidcopyImageRand(Table t, float[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array.static voidcopyImageRand(Table t, int[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array.static voidcopyImageRand(Table t, int nRow, int width, int height, boolean resize, boolean color, long[] rows, com.illumon.integrations.numpy.Java2NumpyCopy.IntValSetter setter) Copies a random selection of image rows into a flattened array.static voidcopyImageRand(Table t, long[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array.static voidcopyImageRand(Table t, short[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, double[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, float[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, int[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, int nRow, int width, int height, boolean resize, boolean color, com.illumon.integrations.numpy.Java2NumpyCopy.IntValSetter setter) Copies a slice of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, long[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array.static voidcopyImageSlice(Table t, long rowStart, short[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidcopyRand(Table t, int nRow, int nCol, long[] rows, Class type, String cast, com.illumon.integrations.numpy.Java2NumpyCopy.CopySetter setter) Casts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a random selection of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static voidCasts data to the desired type and copies a slice of rows into a flattened 2D array.static long[]randRows(int nRow, long tSize) Generates a list of random table rows.static Java2NumpyCopy.TableTypeDetermines the type of table.
-
Constructor Details
-
Java2NumpyCopy
public Java2NumpyCopy()
-
-
Method Details
-
tableType
Determines the type of table.- Parameters:
t- table.- Returns:
- table type.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
copySlice
Casts data to the desired type and copies a slice of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.
-
randRows
public static long[] randRows(int nRow, long tSize) Generates a list of random table rows.- Parameters:
nRow- number of random rows.tSize- table size.- Returns:
- indices of random table rows.
-
copyRand
public static void copyRand(Table t, int nRow, int nCol, long[] rows, Class type, String cast, com.illumon.integrations.numpy.Java2NumpyCopy.CopySetter setter) Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into arrays.- Parameters:
t- table to copy data fromnRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.type- type of output datacast- string used to cast to the output typesetter- setter used to assign data
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyRand
Casts data to the desired type and copies a random selection of rows into a flattened 2D array. This is useful for copying table data directly into numpy arrays.- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.nCol- number of table columns; also the number of columns indata.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, int nRow, int width, int height, boolean resize, boolean color, com.illumon.integrations.numpy.Java2NumpyCopy.IntValSetter setter) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copynRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.setter- setter used to assign data
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, short[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into numpy arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, int[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into numpy arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, long[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into numpy arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, float[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into numpy arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.
-
copyImageSlice
public static void copyImageSlice(Table t, long rowStart, double[] data, int nRow, int width, int height, boolean resize, boolean color) Copies a slice of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table images directly into numpy arrays.
- Parameters:
t- table to copy data fromrowStart- first row of data to copydata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.
-
copyImageRand
public static void copyImageRand(Table t, int nRow, int width, int height, boolean resize, boolean color, long[] rows, com.illumon.integrations.numpy.Java2NumpyCopy.IntValSetter setter) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into arrays.
- Parameters:
t- table to copy data fromnRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.setter- setter used to assign data
-
copyImageRand
public static void copyImageRand(Table t, short[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into numpy arrays.
- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyImageRand
public static void copyImageRand(Table t, int[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into numpy arrays.
- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyImageRand
public static void copyImageRand(Table t, long[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into numpy arrays.
- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyImageRand
public static void copyImageRand(Table t, float[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into numpy arrays.
- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.
-
copyImageRand
public static void copyImageRand(Table t, double[] data, int nRow, int width, int height, boolean resize, boolean color, long[] rows) Copies a random selection of image rows into a flattened array. For color, the array is indexed as [row, height, width, channel], where channel is red, green, blue. For grayscale, the array is indexed as [row, height, width].This is useful for copying table data directly into numpy arrays.
- Parameters:
t- table to copy data fromdata- array to copy data intonRow- number of rows to copy; also the number of rows indata.width- width of the imageheight- height of the imageresize- true to resize the image to the target size; false otherwise.color- true to return a color image; false to return a gray-scale image.rows- indices of rows to copy. Null causes rows to be randomly generated.
-