Fix strides when creating Python buffer