using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace NumSharp.Extensions { public static partial class NDArrayExtensions { public static NDArray Min(this NDArray np) { if(np.NDim == 2) { var min = new NDArray().Zeros(np.Shape.Shapes[1]); for (int col = 0; col < np.Shape.Shapes[1]; col++) { min[col] = np[0, col]; for (int row = 0; row < np.Shape.Shapes[0]; row++) { if(np[row, col] < min[col]) { min[col] = np[row, col]; } } } return min; } else { throw new NotImplementedException(); } } } }