File tree Expand file tree Collapse file tree
src/NumSharp.Core/Backends/Default/ArrayManipulation Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -292,12 +292,12 @@ public static Shape[] Broadcast(params Shape[] shapes)
292292 /// <remarks>Based on https://docs.scipy.org/doc/numpy-1.16.1/user/basics.broadcasting.html </remarks>
293293 public static ( Shape LeftShape , Shape RightShape ) Broadcast ( Shape leftShape , Shape rightShape )
294294 {
295- if ( leftShape . IsBroadcasted || rightShape . IsBroadcasted )
296- throw new NotSupportedException ( "Unable to broadcast already broadcasted shape." ) ; //TODO!
297-
298295 if ( leftShape . _hashCode != 0 && leftShape . _hashCode == rightShape . _hashCode )
299296 return ( leftShape , rightShape ) ;
300297
298+ if ( leftShape . IsBroadcasted || rightShape . IsBroadcasted )
299+ throw new NotSupportedException ( "Unable to broadcast already broadcasted shape." ) ; //TODO! it would make sense to use shape.BroadcastInfo.Original.
300+
301301 Shape left , right , mit ;
302302 int i , nd , k , j , tmp ;
303303
You can’t perform that action at this time.
0 commit comments