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
28
28
public static NDArray multiply ( NDArray x1 , NDArray x2 ) => new NDArray ( tf . multiply ( x1 , x2 ) ) ;
29
29
30
30
[ 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
+ }
32
41
33
42
[ AutoNumPy ]
34
43
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