Example #1
0
        public void NdArrayDemo()
        {
            var a = new[]
            {
                new[] { 1, 2, 3 },
                new[] { 4, 5, 6 }
            };
            NdArray2DInt      array2 = Np.Array2(a); // regular
            NdArray1D <int[]> array1 = Np.Array1(a); // not regular

            var tmp_sin = Np.Sin(array2);
            // var t1_sin = Np.Sin(array1);
        }
        public void T01()
        {
            var a = Np.Array1(new [] { 2, 4, 6 });

            Assert.Equal(4.0, a.Mean());
        }
Example #3
0
 public static void CreateNumpyArrays()
 {
     var list = new[] { 1, 2, 3 };
     var tmp  = Np.Array1(new[] { 1.0, 2, 3 });
     var tmp2 = Np.Array1(new[] { 1.0, 2, 3 }, order: NumpyArrayOrder.C);
 }