mirror of
https://github.com/ml-explore/mlx.git
synced 2025-07-14 20:41:13 +08:00
Use && instead of and (#1663)
* Use && instead of and * Remove "and" in ops.cpp
This commit is contained in:
parent
6ae5423b4a
commit
d92ea094f1
@ -533,7 +533,7 @@ array scaled_dot_product_attention(
|
|||||||
throw std::invalid_argument(msg.str());
|
throw std::invalid_argument(msg.str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mask and (*mask).ndim() > 4) {
|
if (mask && (*mask).ndim() > 4) {
|
||||||
std::ostringstream msg;
|
std::ostringstream msg;
|
||||||
msg << "[scaled_dot_product_attention] the mask with shape "
|
msg << "[scaled_dot_product_attention] the mask with shape "
|
||||||
<< (*mask).shape() << " expected to have at most rank 4";
|
<< (*mask).shape() << " expected to have at most rank 4";
|
||||||
|
@ -808,7 +808,7 @@ std::vector<array> meshgrid(
|
|||||||
outputs.push_back(reshape(arrays[i], std::move(shape), s));
|
outputs.push_back(reshape(arrays[i], std::move(shape), s));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (indexing == "xy" and ndim > 1) {
|
if (indexing == "xy" && ndim > 1) {
|
||||||
Shape shape(ndim, 1);
|
Shape shape(ndim, 1);
|
||||||
|
|
||||||
shape[1] = arrays[0].size();
|
shape[1] = arrays[0].size();
|
||||||
|
Loading…
Reference in New Issue
Block a user