File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/TensorFlowNET.Core/NumPy Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,16 @@ public partial class np
2828 public static NDArray multiply ( NDArray x1 , NDArray x2 ) => new NDArray ( tf . multiply ( x1 , x2 ) ) ;
2929
3030 [ AutoNumPy ]
31- public static NDArray maximum ( NDArray x1 , NDArray x2 ) => new NDArray ( tf . maximum ( x1 , x2 ) ) ;
31+ //public static NDArray maximum(NDArray x1, NDArray x2) => new NDArray(tf.maximum(x1, x2));
32+ public static NDArray maximum ( NDArray x1 , NDArray x2 , int ? axis = null )
33+ {
34+ var maxValues = tf . maximum ( x1 , x2 ) ;
35+ if ( axis . HasValue )
36+ {
37+ maxValues = tf . reduce_max ( maxValues , axis : axis . Value ) ;
38+ }
39+ return new NDArray ( maxValues ) ;
40+ }
3241
3342 [ AutoNumPy ]
3443 public static NDArray minimum ( NDArray x1 , NDArray x2 ) => new NDArray ( tf . minimum ( x1 , x2 ) ) ;
You can’t perform that action at this time.
0 commit comments