Package org.apache.sysds.runtime.util

## Class Py4jConverterUtils

- java.lang.Object
- - org.apache.sysds.runtime.util.Py4jConverterUtils

    public class Py4jConverterUtils
    extends Object

Utils for converting python data to java.

### Constructor Summary

Constructors
`Py4jConverterUtils()`

### Method Summary

All Methods Static Methods Concrete Methods
`static MatrixBlock` `allocateDenseOrSparse​(int rlen, int clen, boolean isSparse)`
`static MatrixBlock` `allocateDenseOrSparse​(long rlen, long clen, boolean isSparse)`
`static Array<?>` `convert​(byte[] data, int numElements, Types.ValueType valueType)`
`static Array<?>[]` `convertFused​(byte[] data, int numElements, Types.ValueType[] valueTypes)`
`static byte[]` `convertMBtoPy4JDenseArr​(MatrixBlock mb)`
`static MatrixBlock` `convertPy4JArrayToMB​(byte[] data, int rlen, int clen)`
`static MatrixBlock` `convertPy4JArrayToMB​(byte[] data, int rlen, int clen, boolean isSparse, Types.ValueType valueType)`
`static MatrixBlock` `convertPy4JArrayToMB​(byte[] data, int rlen, int clen, Types.ValueType valueType)`
`static Object[]` `convertRow​(byte[] data, int numElements, Types.ValueType valueType)`
`static MatrixBlock` `convertSciPyCOOToMB​(byte[] data, byte[] row, byte[] col, int rlen, int clen, int nnz)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### Py4jConverterUtils

    public Py4jConverterUtils()

### Method Detail

#### convertPy4JArrayToMB

    public static MatrixBlock convertPy4JArrayToMB​(byte[] data,
                                                   int rlen,
                                                   int clen)

#### convertPy4JArrayToMB

    public static MatrixBlock convertPy4JArrayToMB​(byte[] data,
                                                   int rlen,
                                                   int clen,
                                                   Types.ValueType valueType)

#### convertSciPyCOOToMB

    public static MatrixBlock convertSciPyCOOToMB​(byte[] data,
                                                  byte[] row,
                                                  byte[] col,
                                                  int rlen,
                                                  int clen,
                                                  int nnz)

#### allocateDenseOrSparse

    public static MatrixBlock allocateDenseOrSparse​(int rlen,
                                                    int clen,
                                                    boolean isSparse)

#### allocateDenseOrSparse

    public static MatrixBlock allocateDenseOrSparse​(long rlen,
                                                    long clen,
                                                    boolean isSparse)

#### convertPy4JArrayToMB

    public static MatrixBlock convertPy4JArrayToMB​(byte[] data,
                                                   int rlen,
                                                   int clen,
                                                   boolean isSparse,
                                                   Types.ValueType valueType)

#### convert

    public static Array<?> convert​(byte[] data,
                                   int numElements,
                                   Types.ValueType valueType)

#### convertRow

    public static Object[] convertRow​(byte[] data,
                                      int numElements,
                                      Types.ValueType valueType)

#### convertFused

    public static Array<?>[] convertFused​(byte[] data,
                                          int numElements,
                                          Types.ValueType[] valueTypes)

#### convertMBtoPy4JDenseArr

    public static byte[] convertMBtoPy4JDenseArr​(MatrixBlock mb)