<div dir="ltr">On Sat, Aug 26, 2017 at 12:09 AM, Jonathan Taylor <<a href="mailto:jonathan.taylor@stanford.edu">jonathan.taylor@stanford.edu</a>> wrote:<br>><br>> Yes, it's a dense 2500x2000 matrix.<br>><br>> Loaded strides: (8, 16000)<br>><br>> Copied strides: (20000, 8)<br>><br>> So, matvec is just slower because of strides and where numpy retrieves data? Is there a simple way to do this besides a copy? I can easily afford the copy, just wondering.<div><br>It's not simpler, but the most efficient and idiomatic way to ensure C-contiguity is to use np.ascontiguousarray(). This will make a copy only if necessary.<br><br>--<br>Robert Kern</div></div>