public class NDArrayUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static List<?> |
getContent(NDArray array)
Gets the payload of a one-dimensional array.
|
static List<?> |
getContent(NDArray array,
String key)
Gets the payload of the specified dimension of a multi-dimensional array.
|
static int[] |
getShape(NDArray array) |
static List<Object> |
parseArray(InputStream is,
String descr,
int length) |
static Object |
parseData(InputStream is,
Object descr,
Object[] shape) |
static Map<String,?> |
parseDict(String string) |
static List<Object[]> |
parseMultiArray(InputStream is,
List<String> descrs,
int length) |
static NDArray |
parseNpy(InputStream is)
http://docs.scipy.org/doc/numpy-dev/neps/npy-format.html
|
static byte |
readByte(InputStream is) |
static double |
readDouble(InputStream is,
ByteOrder byteOrder) |
static float |
readFloat(InputStream is,
ByteOrder byteOrder) |
static int |
readInt(InputStream is,
ByteOrder byteOrder) |
static long |
readLong(InputStream is,
ByteOrder byteOrder) |
static Object |
readObject(InputStream is) |
static short |
readShort(InputStream is,
ByteOrder byteOrder) |
static String |
readString(InputStream is,
int size) |
static String |
readUnicode(InputStream is,
ByteOrder byteOrder,
int size) |
static int |
readUnsignedByte(InputStream is) |
static int |
readUnsignedShort(InputStream is,
ByteOrder byteOrder) |
public static int[] getShape(NDArray array)
public static List<?> getContent(NDArray array)
public static List<?> getContent(NDArray array, String key)
key - The dimension.public static NDArray parseNpy(InputStream is) throws IOException
IOExceptionpublic static Object parseData(InputStream is, Object descr, Object[] shape) throws IOException
IOExceptionpublic static List<Object> parseArray(InputStream is, String descr, int length) throws IOException
IOExceptionpublic static List<Object[]> parseMultiArray(InputStream is, List<String> descrs, int length) throws IOException
IOExceptionpublic static byte readByte(InputStream is) throws IOException
IOExceptionpublic static int readUnsignedByte(InputStream is) throws IOException
IOExceptionpublic static short readShort(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static int readUnsignedShort(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static int readInt(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static long readLong(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static float readFloat(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static double readDouble(InputStream is, ByteOrder byteOrder) throws IOException
IOExceptionpublic static Object readObject(InputStream is) throws IOException
IOExceptionpublic static String readString(InputStream is, int size) throws IOException
IOExceptionpublic static String readUnicode(InputStream is, ByteOrder byteOrder, int size) throws IOException
IOExceptionCopyright © 2021. All rights reserved.