<div dir="ltr"><div class="markdown-here-wrapper" style=""><p style="margin:0px 0px 1.2em!important">Foad, </p>
<p style="margin:0px 0px 1.2em!important">Visualizing data is definitely a complex field. I definitely feel your pain.<br>Printing your data is but one way of visualizing it, and probably only useful for very small and constrained datasets.<br>Have you looked into <a href="https://docs.scipy.org/doc/numpy-1.15.1/reference/generated/numpy.set_printoptions.html"><code style="font-size:0.85em;font-family:Consolas,Inconsolata,Courier,monospace;margin:0px 0.15em;padding:0px 0.3em;white-space:pre-wrap;border:1px solid rgb(234,234,234);background-color:rgb(248,248,248);border-radius:3px;display:inline">set_printoptions</code></a> to see how numpy’s existing capabilities might help you with your visualization?</p>
<p style="margin:0px 0px 1.2em!important">The code you showed seems quite good. I wouldn’t worry about performance when it comes to functions that will seldom be called in tight loops.<br>As you’ll learn more about python and numpy, you’ll keep expanding it to include more use cases.<br>For many of my projects, I create small submodules for visualization tailored to the specific needs of the particular project.<br>I’ll try to incorporate your functions and see how I use them.</p>
<p style="margin:0px 0px 1.2em!important">Your original post seems to have some confusion about C Style vs F Style ordering. I hope that has been resolved.<br>There is also a lot of good documentation<br><a href="https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html#numpy-for-matlab-users-notes">https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html#numpy-for-matlab-users-notes</a><br>about transitioning from matlab.</p>
<p style="margin:0px 0px 1.2em!important">Mark</p>
<div title="MDH:PGRpdiBkaXI9Imx0ciI+PGRpdiBkaXI9Imx0ciI+PGRpdj5Gb2FkLCZuYnNwOzxicj48L2Rpdj48
ZGl2Pjxicj48L2Rpdj48ZGl2PlZpc3VhbGl6aW5nIGRhdGEgaXMgZGVmaW5pdGVseSBhIGNvbXBs
ZXggZmllbGQuIEkgZGVmaW5pdGVseSBmZWVsIHlvdXIgcGFpbi48L2Rpdj48ZGl2PlByaW50aW5n
IHlvdXIgZGF0YSBpcyBidXQgb25lIHdheSBvZiB2aXN1YWxpemluZyBpdCwgYW5kIHByb2JhYmx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M251bXB5LWZvci1tYXRsYWItdXNlcnMt
bm90ZXMmYW1wO3NvdXJjZT1nbWFpbCZhbXA7dXN0PTE1NDE1NjY2NDI2MjIwMDAmYW1wO3VzZz1B
RlFqQ05HTFVvTjBVZUMza1l5T3o3TlhqYUpZcXFWZ0hnIj5odHRwczovL2RvY3Muc2NpcHkub3Jn
L2RvYy88d2JyPm51bXB5L3VzZXIvbnVtcHktZm9yLW1hdGxhYi08d2JyPnVzZXJzLmh0bWwjbnVt
cHktZm9yLW1hdGxhYi08d2JyPnVzZXJzLW5vdGVzPC9hPjwvZGl2PjxkaXY+YWJvdXQgdHJhbnNp
dGlvbmluZyBmcm9tIG1hdGxhYi48L2Rpdj48ZGl2Pjxicj48L2Rpdj48ZGl2Pk1hcms8YnI+PC9k
aXY+PGRpdj48YnI+PC9kaXY+PC9kaXY+PC9kaXY+" style="height:0;width:0;max-height:0;max-width:0;overflow:hidden;font-size:0em;padding:0;margin:0"></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 5, 2018 at 4:46 PM Foad Sojoodi Farimani <<a href="mailto:f.s.farimani@gmail.com" target="_blank">f.s.farimani@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hello everyone,</div><div><br></div><div>Following <a href="https://stackoverflow.com/q/53126305/4999991" target="_blank">this question</a>, I'm convinced that numpy ndarrays are not MATLAB/mathematical multidimentional matrices and I should stop expecting them to be. However I still think it would have a lot of benefit to have a function like sympy's pprint to pretty print. something like pandas .head and .tail method plus  .left .right .UpLeft .UpRight .DownLeft .DownRight methods. when nothing mentioned it would show 4 corners and put dots in the middle if the array is to big for the terminal. </div><div><br></div><div>Best,</div><div>Foad</div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div>