Skip to content

Commit

Permalink
ufuncs.py: Updated subtract to bypass broadcast guard if views are sa…
Browse files Browse the repository at this point in the history
…me dims exactly (broadcasting was updated to be incompatible explicitly with same dims)
  • Loading branch information
HannanNaeem committed Feb 8, 2024
1 parent b782c3a commit 20ff9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pykokkos/lib/ufuncs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,7 @@ def subtract(viewA, valB):

if not is_scalar:

if not check_broadcastable_impl(viewA, valB):
if viewA.shape != valB.shape and not check_broadcastable_impl(viewA, valB): # if shape is not same check compatibility
raise ValueError("Views must be broadcastable")

# check if size is same otherwise broadcast and fix
Expand Down

0 comments on commit 20ff9a3

Please sign in to comment.