コード例 #1
0
 /// <summary>
 /// Calculates the minimum all elements returning a NdArray.
 /// </summary>
 /// <param name="source">The NdArray containing the source values.</param>
 /// <returns>A new scalar NdArray containing the result of this operation.</returns>
 public static NdArray <T> MinNdArray(NdArray <T> source)
 {
     return(MinAxis(0, NdArray <T> .Flattern(source)));
 }
コード例 #2
0
 /// <summary>
 /// Calculates the product all elements returning a NdArray.
 /// </summary>
 /// <param name="source">The NdArray containing the source values.</param>
 /// <returns>A new scalar NdArray containing the result of this operation.</returns>
 public static NdArray <T> ProductNdArray(NdArray <T> source)
 {
     return(ProductAxis(0, NdArray <T> .Flattern(source)));
 }
コード例 #3
0
 /// <summary>
 /// Sums all elements returning a NdArray.
 /// </summary>
 /// <param name="source">The NdArray containing the source values.</param>
 /// <returns>A new scalar NdArray containing the result of this operation.</returns>
 public static NdArray <T> SumNdArray(NdArray <T> source)
 {
     return(SumAxis(0, NdArray <T> .Flattern(source)));
 }
コード例 #4
0
 /// <summary>
 /// Calculates the mean of the NdArray.
 /// </summary>
 /// <param name="source">The NdArray containing the source values.</param>
 /// <returns>The mean estimate.</returns>
 public static T Mean(NdArray <T> source)
 {
     return(MeanAxis(0, NdArray <T> .Flattern(source)).Value);
 }
コード例 #5
0
        /// <summary>
        /// Checks if any element of the NdArray is true returning the result as a NdArray.
        /// </summary>
        /// <param name="source">The NdArray containing the source values.</param>
        /// <returns>A new NdArray containing the result of this operation.</returns>
        public static NdArray <bool> AnyNdArray(NdArray <bool> source)
        {
            var flattendArray = NdArray <bool> .Flattern(source);

            return(AnyAxis(0, flattendArray));
        }