Пример #1
0
        public static AFArray Mean(AFArray arr, int dim)
        {
            IntPtr ptr;

            Internal.VERIFY(AFStatistics.af_mean(out ptr, arr._ptr, dim));
            return(new AFArray(ptr));
        }
Пример #2
0
        public static SuperArray Mean(SuperArray arr, uint dim)
        {
            AFArray y = CreateMajorSupportedArray(arr);
            IntPtr  ptr;

            Internal.VERIFY(AFStatistics.af_mean(out ptr, y._ptr, dim));
            return(new SuperArray(new AFArray(ptr)));
        }
Пример #3
0
        public static SuperArray Mean(SuperArray arr, uint[] dims)
        {
            AFArray y = CreateMajorSupportedArray(arr);

            IntPtr ptr = IntPtr.Zero;

            foreach (var dim in dims)
            {
                Internal.VERIFY(AFStatistics.af_mean(out ptr, y._ptr, dim));
                y._ptr = ptr;
            }

            return(new SuperArray(new AFArray(ptr)));
        }