コード例 #1
0
        public StorageTester()
        {
            Storage1DInt = NDStorage.CreateByShapeAndType(typeof(int), new Shape(6));
            Storage1DInt.SetData(new int[] { 0, 1, 2, 3, 4, 5 });

            Storage1DDouble = NDStorage.CreateByShapeAndType(typeof(double), new Shape(6));
            Storage1DDouble.SetData(new double[] { 0.1, 1.5, 2.2, 3.5, 4.9, 5.0 });

            Storage2DInt = NDStorage.CreateByShapeAndType(typeof(int), new Shape(2, 3));
            Storage2DInt.SetData(new int[] { 0, 1, 2, 3, 4, 5 });
        }
コード例 #2
0
 public NDArray(Shape shape) : this()
 {
     Storage = NDStorage.CreateByShapeAndType(Storage.dtype, shape);
 }
コード例 #3
0
 public NDArray()
 {
     Storage.dtype = typeof(T);
     Storage       = NDStorage.CreateByShapeAndType(this.dtype, new Shape(1));
 }