Data layout
#2492
Replies: 1 comment
-
The underlying data is not necessarily row- contiguous. If you transpose and array for example then you can't access it linearly and expect the values to be correct. You have two options:
In either case you should be extra careful to make sure the array is evaluated before you access it's raw pointer as there are no checks for that. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to save the arrays to a netcdf file. But I'm discovering that data is sometimes inconsistent with the shape. Consider the reduced example here.
If I run this, the arrays print to the screen in the expected order but the data layout is inconsistent.
Is there a way to get a pointer to memory laid out consistent with the shape using the C++ api?
Beta Was this translation helpful? Give feedback.
All reactions