Using order='F' solved the problem. Thanks for reply. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160411/cec2ae9a/attachment.html>