0ul is not size_t on MSVC (#1762)

This commit is contained in:
Cheng 2025-01-11 05:33:11 +09:00 committed by GitHub
parent 1ce0c0fcb0
commit ab8e832c18
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -824,7 +824,7 @@ array slice_update(
// Broadcast update with unspecified axes // Broadcast update with unspecified axes
auto up_shape = update.shape(); auto up_shape = update.shape();
auto dim_diff = std::max(src.ndim() - update.ndim(), 0ul); auto dim_diff = std::max(src.ndim() - update.ndim(), size_t(0));
up_shape.insert( up_shape.insert(
up_shape.begin(), src.shape().begin(), src.shape().begin() + dim_diff); up_shape.begin(), src.shape().begin(), src.shape().begin() + dim_diff);
for (int d = dim_diff; d < src.ndim(); ++d) { for (int d = dim_diff; d < src.ndim(); ++d) {