Beispiel #1
0
        private static Matrix <double> _constructMatrixFromObjInfo(
            NumpyOps.ObjectInfo robj)
        {
            int rows = robj.shape[0];
            int cols = robj.shape[1];

            double[] matrix_data = _deserializeArray(robj.data);
            return(dMB.DenseOfRowMajor(rows, cols, matrix_data));
        }
Beispiel #2
0
 private static NumpyOps.ObjectInfo[] _getObjectInfos(params Matrix <double>[] mats)
 {
     NumpyOps.ObjectInfo[] infos = new NumpyOps.ObjectInfo[mats.Length];
     for (int i = 0; i < infos.Length; i++)
     {
         infos[i] = _getObjectInfo(mats[i]);
     }
     return(infos);
 }