public static MArrayShape FromDoubles(double rowCount, double columnCount) { var m = PseudoBuiltins.ToInt(rowCount); var n = PseudoBuiltins.ToInt(columnCount); if (m < 0 || n < 0) { throw new MArrayShapeException(); } return(new MArrayShape(m, n)); }
public static MArrayShape FromDoubles(double rowCount, double columnCount, double sliceCount) { var m = PseudoBuiltins.ToInt(rowCount); var n = PseudoBuiltins.ToInt(columnCount); var o = PseudoBuiltins.ToInt(sliceCount); if (m < 0 || n < 0 || o < 0) { throw new MArrayShapeException(); } return(new MArrayShape(new int[] { m, n, o }, Unchecked.Instance)); }
private static TScalar ToScalar <TScalar>(MFullArray <TScalar> array) { return(PseudoBuiltins.ToScalar(array)); }