Great; thanks for the response! This is my first time posting here so it's
After reading through all the responses, it appears as though Sturla's
is the right way to go. It is superior to the &a solution because it
a = np.arange(10, dtype=int)
# This works even if a hasn't been casted yet.
# These cause errors if the array is not casted because a and a.data
cdef np.ndarray[long, ndim=1, mode="c"] x = a
# After casting, everything works and is consistent.
fprintf(stderr, "%lu %lu %lu\n", buf_ptr1, buf_ptr2, buf_ptr3)
# Output for an example run-- all addresses are the same, which is what
Not having to cast the array before extracting the buffer is useful if one
So I think Sturla's solution is what we should use in the future. It has
Anyone have any other reasons why Sturla's solution might not be a good
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.