fix broadcast bug in bitwise ops (#1157)

This commit is contained in:
Awni Hannun
2024-05-24 11:44:40 -07:00
committed by GitHub
parent 9f9cb7a2ef
commit a87ef5bfc1
3 changed files with 12 additions and 4 deletions

View File

@@ -4321,8 +4321,9 @@ array bitwise_impl(
}
auto inputs =
broadcast_arrays(astype(a, out_type, s), astype(b, out_type, s), s);
auto& out_shape = inputs[0].shape();
return array(
a.shape(),
out_shape,
out_type,
std::make_shared<BitwiseBinary>(to_stream(s), op),
std::move(inputs));