Make array conform to the Python Buffer Protocol (#323)

This commit is contained in:
Daniel Strobusch
2024-01-06 00:58:33 +01:00
committed by GitHub
parent dfdb284e16
commit 1331fa19f6
10 changed files with 343 additions and 109 deletions

View File

@@ -222,6 +222,8 @@ TEST_CASE("test array types") {
// complex64
{
CHECK_EQ(sizeof(complex64_t), sizeof(std::complex<float>));
complex64_t v = {1.0f, 1.0f};
array x(v);
CHECK_EQ(x.dtype(), complex64);