mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 17:31:16 +08:00
Remove test of converting negative float to uint (#2048)
This commit is contained in:
parent
6cf48872b7
commit
ba09f01ce8
@ -139,14 +139,6 @@ TEST_CASE("test astype") {
|
|||||||
y = astype(x, int32);
|
y = astype(x, int32);
|
||||||
CHECK_EQ(y.dtype(), int32);
|
CHECK_EQ(y.dtype(), int32);
|
||||||
CHECK_EQ(y.item<int>(), -3);
|
CHECK_EQ(y.item<int>(), -3);
|
||||||
|
|
||||||
y = astype(x, uint32);
|
|
||||||
CHECK_EQ(y.dtype(), uint32);
|
|
||||||
|
|
||||||
// Use std::copy since the result is platform dependent
|
|
||||||
uint32_t v;
|
|
||||||
std::copy(x.data<float>(), x.data<float>() + 1, &v);
|
|
||||||
CHECK_EQ(y.item<uint32_t>(), v);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user