public static T[] ToArray <T>(this ndarray a) { if (a.IsASlice) { List <T> Data = a.ToList <T>(); return(Data.ToArray()); } else { T[] data = (T[])a.rawdata(0).datap; return(data); } }
public static double StandardDeviation <T>(this ndarray a) { return(a.ToList <T>().StandardDeviation()); }
public static double Variance <T>(this ndarray a) { return(a.ToList <T>().Variance()); }
public static double Mean <T>(this ndarray a) { return(a.ToList <T>().Mean()); }