Ejemplo n.º 1
0
        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));
        }
Ejemplo n.º 2
0
        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));
        }