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 }); }
public NDArray(Shape shape) : this() { Storage = NDStorage.CreateByShapeAndType(Storage.dtype, shape); }
public NDArray() { Storage.dtype = typeof(T); Storage = NDStorage.CreateByShapeAndType(this.dtype, new Shape(1)); }