Whenever you are working with large size numpy array, it’s quite difficult to observe a set of values in the array. Because of Python interpreter prints the large size numpy array with wrapping the values by truncating in between values when you print the array.
Let’s see the example, print the numpy array of size 40 * 40. It will print only a few staring and ending rows of the array.
import numpy as np arr = np.random.rand(40,40) print(arr)
[[0.37385447 0.08090361 0.95847602 ... 0.4819786 0.57780343 0.31450112] [0.21590934 0.49908045 0.31805202 ... 0.08598228 0.25333344 0.20169503] [0.89488835 0.9611398 0.15296447 ... 0.49536484 0.74301537 0.60712609] ... [0.71318428 0.94624094 0.97738818 ... 0.45732934 0.42705254 0.07409819] [0.98642911 0.47926583 0.66327397 ... 0.05445649 0.90387045 0.5950844 ] [0.50283394 0.68733643 0.17789349 ... 0.01015769 0.02850363 0.75184678]]
Let’s print the entire array by using numpy.set_printoptions option. These options handle to display the numpy object.
import numpy as np np.set_printoptions(threshold=np.inf) arr = np.random.rand(40,40) print(arr)
[[0.9060074 0.7069775 0.87679419 0.15060431 0.41126731 0.49971562 0.4625084 0.72959281 0.29935909 0.41737745 0.26182823 0.71705806 0.64627672 0.38034981 0.01416612 0.4726665 0.76103833 0.51919453 0.13693286 0.60979366 0.48028654 0.22060651 0.48850142 0.74923196 0.40328534 0.79662886 0.2256987 0.76661762 0.5936546 0.06561492 0.00403536 0.24313167 0.8331688 0.2161511 0.315518 0.61339175 0.0681111 0.42659008 0.27886521 0.43599268] [0.04453874 0.57287032 0.38781344 0.51578234 0.28813506 0.18085584 0.65127101 0.86212294 0.6152214 0.02090024 0.38844095 0.19885705 0.22556263 0.81537678 0.56737241 0.89413192 0.13330589 0.70580792 0.2673298 0.1548986 0.86738406 0.86150815 0.61110544 0.05686161 0.53005919 0.73520973 0.28617561 0.76178985 0.48029566 0.09508357 0.00556946 0.53305303 0.32397664 0.00242446 0.61903038 0.06102676 0.63328362 0.33477572 0.35376759 0.15731451] [0.94683953 0.56733827 0.9986653 0.01031058 0.89317399 0.43679308 0.68778446 0.01541403 0.77414735 0.63658599 0.13397138 0.31866207 0.83713145 0.80862182 0.71402483 0.65906675 0.02664529 0.2304455 0.48626614 0.54998918 0.28021453 0.9493466 0.49908287 0.69507317 0.94976971 0.90814851 0.88595434 0.4958287 0.59509997 0.42901341 0.84322169 0.15602009 0.71769806 0.90774219 0.8804572 0.61850224 0.1428864 0.6455497 0.38788861 0.6209895 ] [0.54994183 0.7535795 0.12194447 0.58560065 0.84144422 0.5008942 0.29263047 0.14290976 0.70707762 0.55210527 0.94458272 0.95507365 0.98980243 0.98295864 0.42508816 0.62886685 0.33350377 0.1805172 0.43307761 0.18252646 0.9975611 0.64547134 0.0687961 0.37157265 0.55762668 0.85864015 0.33834365 0.84641448 0.19915352 0.81844012 0.94599119 0.17557845 0.3556756 0.74328211 0.83780981 0.58150902 0.06851159 0.36552688 0.92937181 0.67359163] [0.21202345 0.58521362 0.44532455 0.09982653 0.40627856 0.33008665 0.99586724 0.93337356 0.7607822 0.31145803 0.1522345 0.28831475 0.37181461 0.42585441 0.96582646 0.08452094 0.37095899 0.95135777 0.22227946 0.76815975 0.18968704 0.04045088 0.63795437 0.54341988 0.80689938 0.7490247 0.39129909 0.57458287 0.97469999 0.15216025 0.71470319 0.72112406 0.21119335 0.13738019 0.9132968 0.95616386 0.48450157 0.94511648 0.62255861 0.33653117] [0.97624159 0.1801078 0.85637864 0.09151391 0.71105357 0.50525174 0.09380847 0.81159926 0.35990649 0.41989383 0.95659246 0.86489824 0.10915087 0.3507715 0.91187026 0.11126865 0.99160857 0.98683019 0.33237821 0.98742817 0.57991252 0.75970518 0.3617359 0.32935432 0.56098798 0.67801894 0.9922529 0.10749315 0.05214981 0.96377682 0.19147767 0.80171791 0.87338139 0.505941 0.7624635 0.07162943 0.5422902 0.04054446 0.08919186 0.70242727] [0.68103855 0.35835401 0.66416528 0.80137766 0.96189966 0.36816912 0.25317105 0.14302004 0.04785283 0.66458576 0.81008572 0.56366327 0.16560492 0.53226934 0.3076546 0.68447741 0.17600914 0.73402738 0.77011631 0.96841228 0.68160061 0.45901095 0.95917304 0.28852553 0.52916599 0.70465803 0.86140737 0.24226239 0.67074487 0.41305714 0.25920488 0.33891919 0.80745942 0.08630031 0.31233461 0.68682063 0.63074117 0.97375694 0.13296794 0.55098931] [0.26871068 0.33764235 0.67546419 0.92958813 0.675459 0.05775217 0.85457147 0.61698046 0.0344889 0.21893933 0.57898257 0.0381713 0.23160965 0.9398568 0.84416015 0.54707262 0.46609467 0.46501642 0.11940926 0.0583524 0.88352952 0.53264313 0.33234242 0.24468385 0.51167538 0.52587028 0.15055815 0.90253921 0.21639604 0.54009787 0.68637097 0.29162425 0.3180485 0.9220564 0.47558641 0.64447244 0.5695656 0.60615236 0.40057286 0.48401759] [0.82385693 0.6065212 0.28126387 0.35723108 0.30877102 0.4551252 0.06516516 0.9106496 0.91408071 0.35800752 0.47078046 0.39944045 0.47804987 0.83829586 0.56683966 0.69349071 0.85344265 0.29309799 0.20737916 0.56207319 0.11701722 0.91303221 0.92460927 0.56998783 0.70122756 0.58986725 0.67209507 0.02626129 0.83651254 0.34515223 0.83039221 0.62623866 0.40334365 0.56792927 0.74645406 0.21036165 0.96736388 0.52732419 0.42110538 0.4085733 ] [0.76661404 0.27348729 0.44635945 0.35554745 0.5007115 0.82067006 0.62408709 0.97502374 0.65168097 0.61031741 0.36651331 0.79615817 0.22538074 0.32536293 0.52365382 0.11477815 0.41357054 0.30603113 0.19475228 0.95824735 0.37462572 0.64648171 0.55594677 0.14382152 0.38389696 0.69922698 0.24611975 0.48435051 0.58129951 0.05386154 0.82729003 0.92585631 0.91698707 0.09440214 0.20919155 0.53809068 0.06727378 0.48419865 0.74684007 0.82896921] [0.2249596 0.87369393 0.63521456 0.87655481 0.51915719 0.08066764 0.47693346 0.87989929 0.84766385 0.02609826 0.85070748 0.67225645 0.62358686 0.59120309 0.25389113 0.87176027 0.59990166 0.74144819 0.53273167 0.51444766 0.9197567 0.62144635 0.33606516 0.73535405 0.82168472 0.9432993 0.19221815 0.39903579 0.89775469 0.98946438 0.41456906 0.3955784 0.42769117 0.78858869 0.9383913 0.99350607 0.26571892 0.15182839 0.74800657 0.21815942] [0.97262513 0.10781358 0.22689984 0.1760846 0.09892426 0.86212068 0.60395951 0.10302868 0.92621165 0.17423929 0.49494755 0.40783403 0.33559787 0.52816588 0.72207689 0.86888221 0.81278324 0.69708173 0.09078236 0.15648901 0.80105308 0.5650231 0.22160152 0.55394796 0.67579533 0.92203742 0.05945564 0.292997 0.88279174 0.03702309 0.41048213 0.26132484 0.25335207 0.69270795 0.77437179 0.01016698 0.74073648 0.60233249 0.88139322 0.29111556] [0.39894596 0.41830175 0.34935252 0.8514828 0.54327554 0.73520333 0.13448248 0.83941422 0.36604343 0.83218635 0.645996 0.81643253 0.23080507 0.93978273 0.07818456 0.26338048 0.92826485 0.34038323 0.93506811 0.07024295 0.34105615 0.51433289 0.6128109 0.51909494 0.14631168 0.7778372 0.12783538 0.80887557 0.56667811 0.15510831 0.81503123 0.34978331 0.96283622 0.73655194 0.18489933 0.27086282 0.59842542 0.07818539 0.23986857 0.38716472] [0.27673252 0.66541708 0.24000513 0.01578486 0.8491303 0.29258066 0.30291343 0.08977548 0.24946032 0.29199596 0.35668036 0.01662202 0.18822963 0.60198891 0.62517546 0.58319713 0.32215956 0.5744441 0.36075169 0.20702058 0.46833981 0.73539936 0.47589962 0.94965108 0.03415359 0.74200952 0.10483758 0.28570145 0.1369098 0.00816542 0.10713075 0.45485699 0.21532431 0.0527893 0.6164591 0.31316062 0.77344972 0.44616358 0.95952688 0.82566924] [0.90117959 0.88874053 0.78617033 0.66983464 0.94106284 0.00906734 0.46015186 0.92754575 0.6482254 0.13863223 0.60587166 0.70595303 0.56917371 0.56916667 0.38526582 0.1829594 0.35713579 0.43942484 0.14969028 0.42616169 0.30732555 0.4563725 0.00574951 0.94545955 0.85624752 0.37488023 0.43665082 0.17441495 0.60632612 0.54677713 0.09090593 0.56429556 0.58842525 0.16811189 0.12981594 0.42675708 0.25258543 0.01154217 0.34586779 0.34289848] [0.47073449 0.87381194 0.56292675 0.70123029 0.56297921 0.87620338 0.47906683 0.57912298 0.61259298 0.15409445 0.81052395 0.58941714 0.7646936 0.88736161 0.07767895 0.41929356 0.83994904 0.35816641 0.89514476 0.83102561 0.56200389 0.3853265 0.13601393 0.21826941 0.26018378 0.62420313 0.02061301 0.71767015 0.07239254 0.80707218 0.32894382 0.52652076 0.97970234 0.70511238 0.50731409 0.1849257 0.40775074 0.75708681 0.87173535 0.21989105] [0.34913277 0.76664702 0.5920666 0.50762543 0.90305705 0.24990715 0.34954616 0.69824005 0.48274313 0.24090001 0.89450762 0.0649258 0.54495309 0.18136177 0.15618695 0.31386731 0.16433029 0.06156346 0.43351969 0.00983478 0.73707107 0.88704402 0.47713238 0.19553772 0.5077652 0.83251791 0.87412121 0.79965819 0.62231412 0.53334488 0.20965135 0.11944279 0.91529583 0.04705204 0.97983017 0.34441794 0.60538009 0.40855986 0.78787258 0.70292852] [0.22651138 0.36013555 0.80614994 0.09164926 0.6801875 0.46578317 0.92682707 0.01276523 0.40608288 0.41041264 0.54945303 0.29140043 0.22071506 0.2075234 0.10858678 0.3953645 0.82721035 0.42946816 0.62233912 0.59084961 0.62640699 0.58492835 0.57621466 0.41837012 0.66970406 0.27241075 0.56483476 0.05865646 0.74815808 0.77899833 0.13735835 0.90157589 0.41771922 0.45248564 0.10879264 0.83890399 0.51432592 0.37185384 0.21228001 0.85427336] [0.68593244 0.62110007 0.27501528 0.068644 0.5622021 0.95907189 0.06264836 0.7679838 0.9343113 0.93455937 0.50429328 0.0017692 0.54660303 0.46575978 0.47386452 0.88742255 0.59291707 0.61429718 0.57998365 0.99849264 0.08370426 0.91899184 0.03733157 0.54326249 0.92466568 0.90114723 0.20062302 0.48949612 0.77994903 0.86216583 0.59377526 0.6324319 0.57711214 0.70619261 0.6633579 0.1124775 0.97201251 0.24163167 0.10160067 0.7715459 ] [0.20552521 0.8300775 0.4529499 0.03090393 0.5120809 0.93337884 0.81914378 0.06848022 0.52192071 0.53213214 0.177907 0.89140045 0.96048882 0.88654456 0.26630878 0.19798192 0.6200703 0.45297422 0.69117777 0.29258903 0.90934271 0.79902067 0.31075973 0.7104467 0.27818185 0.54021693 0.70587178 0.85962794 0.41551175 0.83892636 0.50279977 0.04490268 0.86431019 0.00517882 0.13051837 0.4141308 0.41208662 0.09983873 0.16460351 0.08137374] [0.73758917 0.27619998 0.87750402 0.1155097 0.18414711 0.09561121 0.1130655 0.55186022 0.45716998 0.36548306 0.88053292 0.12123528 0.21043938 0.44924024 0.88103032 0.36100264 0.64432699 0.88621267 0.72155975 0.88071827 0.22309464 0.92882076 0.16488752 0.96616262 0.2174964 0.37594942 0.94488589 0.5472873 0.54770939 0.30233739 0.45430894 0.41024383 0.40735504 0.19349062 0.49068806 0.1682294 0.48781025 0.87929743 0.91839335 0.72381459] [0.02928744 0.06229776 0.49857777 0.93357453 0.80548761 0.53945644 0.90416988 0.60290213 0.99873768 0.20721957 0.62204492 0.89987765 0.54528087 0.39986437 0.35710665 0.62102174 0.83068877 0.71224538 0.10485746 0.09541323 0.52797215 0.42627251 0.28957551 0.16012917 0.99666898 0.69547632 0.14694386 0.24593489 0.83015263 0.26757422 0.12438577 0.29971036 0.80626441 0.48036525 0.39825401 0.65986085 0.37673934 0.06871054 0.88142728 0.91781467] [0.0705131 0.48001199 0.25793704 0.22875359 0.74448942 0.22522957 0.16924608 0.94253905 0.09150287 0.95786258 0.70689922 0.88445665 0.54422755 0.30381775 0.26080786 0.89868186 0.57027341 0.69483336 0.45357639 0.62067558 0.89563663 0.86635834 0.45060667 0.17510231 0.45855078 0.02567216 0.21013222 0.17240699 0.02446254 0.65721272 0.00226642 0.4351677 0.13938959 0.27961959 0.78886568 0.46240932 0.20449492 0.48643481 0.26174669 0.671201 ] [0.49134984 0.91176628 0.71133666 0.92971678 0.83645033 0.92021287 0.90375169 0.17244105 0.06780817 0.30569497 0.5809213 0.41312712 0.12624388 0.56189884 0.02125381 0.3426761 0.92935237 0.22472301 0.31877294 0.10061105 0.46890609 0.58180624 0.93665046 0.37345395 0.38391875 0.36644917 0.11520462 0.41787494 0.1421363 0.4807678 0.88049446 0.00248099 0.04625887 0.95494984 0.96049752 0.42212519 0.41388734 0.33634397 0.50995181 0.76164604] [0.28284257 0.61854548 0.46056226 0.76816734 0.14904004 0.15003153 0.50656667 0.82028532 0.36673387 0.17919689 0.4406546 0.03850157 0.91317207 0.39628936 0.17115473 0.04009495 0.87550811 0.30641842 0.95454816 0.68996609 0.10593596 0.04346651 0.27397577 0.68012936 0.87800083 0.11747172 0.87503442 0.09030076 0.13566633 0.03344124 0.15876507 0.78051108 0.3651034 0.18571759 0.17711929 0.22008638 0.83760781 0.77147978 0.84874467 0.99869493] [0.72477062 0.6337661 0.93567252 0.12050258 0.85877017 0.98446267 0.63001227 0.05603562 0.38549142 0.17227204 0.65763941 0.8594285 0.01445248 0.80276124 0.05092666 0.01690773 0.95473907 0.87342844 0.44991189 0.38321237 0.22167065 0.19520672 0.70929428 0.60993591 0.35716637 0.75733598 0.24591211 0.31089418 0.79695983 0.5769594 0.53859551 0.94960706 0.18819288 0.16103267 0.86404495 0.13918353 0.55369777 0.44504066 0.25426796 0.02927037] [0.50083904 0.93434902 0.17096047 0.04289243 0.97272212 0.82055121 0.93540196 0.86856362 0.14560121 0.72624922 0.68803982 0.74485264 0.18535418 0.31291953 0.86437076 0.88366264 0.7452729 0.199998 0.74009746 0.43075092 0.14888822 0.99181781 0.23590615 0.66430973 0.43623343 0.07252427 0.73430663 0.32221897 0.52985329 0.08959998 0.91139052 0.91810448 0.08640351 0.62668322 0.22959919 0.18417126 0.44048664 0.9642734 0.29991155 0.56446773] [0.33223554 0.12079108 0.11142864 0.34195432 0.9447088 0.5736189 0.04446361 0.40970207 0.10585084 0.67384237 0.35929611 0.94003802 0.37905171 0.67919055 0.41638308 0.31245729 0.079142 0.47396323 0.16874087 0.53463319 0.92724287 0.7248802 0.60857466 0.67945652 0.59554016 0.84040341 0.12380968 0.06859425 0.53595166 0.67496258 0.72139056 0.96201792 0.27572115 0.57120324 0.02886151 0.26599694 0.9133301 0.89488155 0.08693324 0.09718161] [0.1675014 0.87819762 0.66116851 0.98880681 0.95861898 0.65942277 0.81786099 0.54400018 0.88374582 0.5168441 0.76860353 0.45227728 0.65491286 0.70521116 0.06275199 0.6507611 0.72961286 0.21731471 0.24529142 0.29630049 0.92249904 0.21673196 0.35566149 0.11146374 0.256448 0.99620464 0.77026022 0.16018588 0.08927337 0.31295592 0.31219053 0.82704788 0.0246003 0.53570715 0.11785212 0.27752441 0.57067279 0.35430814 0.31392236 0.1768083 ] [0.25210611 0.62593607 0.64519795 0.68241249 0.57198876 0.30020731 0.25503377 0.84358717 0.55167013 0.98928375 0.04337872 0.72423536 0.02712778 0.70237519 0.23198162 0.53861097 0.90044866 0.61164969 0.49932286 0.86230239 0.38237452 0.37829178 0.54051327 0.97222987 0.07002903 0.53270675 0.29049107 0.12146116 0.9182545 0.97924241 0.87531193 0.972897 0.76604208 0.55643501 0.64561292 0.70682477 0.06051841 0.21928795 0.7069556 0.37841585] [0.61163899 0.41674483 0.11797452 0.26958541 0.9506512 0.90310911 0.25676767 0.52009169 0.67208804 0.03677923 0.04121858 0.16289548 0.96908526 0.6324834 0.79944828 0.24532423 0.12961995 0.82493701 0.65087755 0.39861225 0.52283865 0.2835932 0.83029157 0.97380417 0.1301583 0.40675758 0.245067 0.27730402 0.82088103 0.04491097 0.8369175 0.31312574 0.83462272 0.66648855 0.36563223 0.0832436 0.42630863 0.21500916 0.61408193 0.09312597] [0.24774578 0.56511278 0.32205329 0.86568607 0.46319763 0.71725037 0.57781138 0.61164533 0.55617708 0.94221331 0.56552573 0.16323501 0.52602572 0.13489383 0.40347711 0.20823295 0.4499304 0.9641836 0.57980298 0.59389682 0.69049924 0.78804448 0.71574902 0.00507928 0.00264886 0.81017584 0.73491008 0.10288174 0.19662764 0.74477178 0.96802439 0.51572897 0.5297318 0.24865583 0.26193953 0.35968956 0.66452886 0.08049263 0.19561994 0.92790761] [0.72913939 0.29618612 0.8096979 0.19503771 0.70468766 0.7321638 0.71207747 0.82356702 0.6488304 0.18129778 0.24792255 0.92827098 0.11780017 0.12787392 0.00534223 0.70145043 0.91901515 0.11736815 0.17727856 0.71021894 0.00228321 0.14527691 0.78251164 0.43473583 0.62548376 0.52093997 0.28897633 0.12365771 0.8573673 0.8310704 0.44585797 0.07870149 0.90242781 0.23632952 0.11190705 0.31666855 0.51273316 0.54138912 0.53568264 0.40812348] [0.7970429 0.40949561 0.71094123 0.01454781 0.52025468 0.99947449 0.74728293 0.92628036 0.1559555 0.74825434 0.53887729 0.77430897 0.75835028 0.34826047 0.0877732 0.45833428 0.46153968 0.89298914 0.53408149 0.23311351 0.70643376 0.08182283 0.92016184 0.89730999 0.74388037 0.35244117 0.43626141 0.78237784 0.40961209 0.78127885 0.48053186 0.04933027 0.90868578 0.97424784 0.18116923 0.99228494 0.45341986 0.75927732 0.99463416 0.01967494] [0.75160703 0.08007326 0.60487843 0.59311364 0.85364619 0.22966177 0.34518878 0.02706764 0.71296263 0.09039146 0.04683872 0.59422339 0.9990837 0.68002173 0.79240937 0.20093818 0.71692303 0.88345156 0.42596486 0.54357394 0.05608801 0.89733237 0.30365877 0.18254403 0.85089307 0.93897134 0.56961 0.97640613 0.91345206 0.2366914 0.15655296 0.98088665 0.01727792 0.69512326 0.30949589 0.78290134 0.37192012 0.22160588 0.08661264 0.83197117] [0.23440007 0.61955694 0.50717139 0.39733623 0.76760827 0.87238848 0.45192031 0.90960714 0.42631228 0.06616961 0.70697346 0.34521511 0.50443352 0.61271268 0.41248202 0.92761171 0.20939691 0.96902115 0.92265783 0.64698325 0.12893199 0.1931198 0.76307736 0.09254107 0.68710301 0.70969926 0.58197595 0.41175828 0.46030793 0.89899832 0.29194898 0.79274257 0.03138781 0.32626194 0.53848877 0.10143065 0.1815991 0.87088364 0.63744796 0.89534417] [0.43430939 0.577845 0.18731143 0.31291863 0.71863601 0.24445447 0.1104657 0.56229594 0.85904546 0.52577076 0.88568693 0.33777852 0.20590783 0.37311644 0.22263454 0.54502291 0.38175406 0.02665184 0.38990588 0.86973339 0.46822168 0.35850504 0.39104892 0.73747874 0.445407 0.92493615 0.8616527 0.05620378 0.4897408 0.9055029 0.77349006 0.22593801 0.49548129 0.33655355 0.18412655 0.5563578 0.77507104 0.9660111 0.16769894 0.47900341] [0.37022832 0.40003023 0.39216631 0.77356083 0.2642107 0.03345726 0.69499227 0.93137179 0.40267245 0.92128844 0.43180562 0.65436274 0.52676929 0.35645794 0.4542928 0.93409833 0.18590069 0.91254138 0.52975332 0.3288512 0.45449404 0.44850429 0.54117315 0.62043888 0.05258522 0.25280592 0.29198151 0.71202643 0.9328241 0.32240386 0.80616455 0.73043939 0.38106416 0.51056972 0.35427218 0.66279585 0.43467384 0.74020723 0.19633163 0.23353506] [0.08224312 0.68302981 0.10354337 0.47732521 0.8608515 0.15953527 0.83012881 0.07445976 0.60752769 0.08298954 0.95850469 0.60272212 0.31447861 0.54385091 0.7243679 0.39624113 0.68644843 0.23911535 0.09013853 0.07898784 0.18581312 0.88608428 0.0970821 0.29350089 0.30927155 0.8209753 0.16420556 0.2000085 0.15891973 0.30244872 0.41597629 0.24406654 0.1529223 0.61478785 0.67557151 0.26561383 0.56059992 0.87250015 0.98408108 0.64301922] [0.58308749 0.93939161 0.81432263 0.02083927 0.61101912 0.51205876 0.31723262 0.95853593 0.04836256 0.87528936 0.90484229 0.51721478 0.92048801 0.90256093 0.90972168 0.73861881 0.76438204 0.44205402 0.24168603 0.3367103 0.74767217 0.81571852 0.39003473 0.77580908 0.17435822 0.86706162 0.04341969 0.850289 0.25995897 0.78992246 0.47803108 0.94381773 0.90294455 0.52874394 0.82835827 0.17042058 0.69080522 0.38018752 0.9621233 0.81984626]]