{"id":402,"date":"2018-07-18T08:51:47","date_gmt":"2018-07-18T06:51:47","guid":{"rendered":"http:\/\/35.180.88.53\/?p=402"},"modified":"2018-07-18T08:51:47","modified_gmt":"2018-07-18T06:51:47","slug":"what-i-learned-yesterday-8","status":"publish","type":"post","link":"https:\/\/www.sergilehkyi.com\/es\/2018\/07\/what-i-learned-yesterday-8\/","title":{"rendered":"What I Learned Yesterday #8"},"content":{"rendered":"<p>Yesterday I was refreshing my knowledge of NumPy package:<\/p>\n<ul>\n<li>NumPy &#8211; Numerical Python (didn&#8217;t know that)<\/li>\n<li>NumPy arrays: contain only one type<\/li>\n<li>Different types &#8211; different behavior: &#8220;string&#8221;+&#8221;string&#8221;=&#8221;stringstring&#8221;, 1+1=2, NumPy array + NumPy array = every element of each array will be added to each other: array([1,2,3])+array([1,2,3])=array([2,4,6])<\/li>\n<li>Conditional selection in NumPy array &#8211; arr[arr &gt; 1]<\/li>\n<li>NumPy arrays are N-dimensional arrays<\/li>\n<li>subsetting in 2D array: arr[0][2] &#8211; first square brackets &#8211; index of the row, second &#8211; index of the column<\/li>\n<li>subsetting in 2D array: arr[:,2] &#8211; all rows of the second column<\/li>\n<li>selecting range of indexes: arr[1:3] &#8211; first value including, second &#8211; excluding -&gt; this command will select only first and second elements of the index<\/li>\n<li>some useful basic statistics functions: mean(), median(), correlation coefficient &#8211; corrcoef(), standard deviation &#8211; std(), sum(), sort(), round()<\/li>\n<\/ul>\n<p>Quite technical, but it really helped me to repeat the basics and highlight some things that were not straightforward to me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I was refreshing my knowledge of NumPy package: NumPy &#8211; Numerical Python (didn&#8217;t know that) NumPy arrays: contain only&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,7],"tags":[],"translation":{"provider":"WPGlobus","version":"3.0.0","language":"es","enabled_languages":["gb","es","uk"],"languages":{"gb":{"title":true,"content":true,"excerpt":false},"es":{"title":false,"content":false,"excerpt":false},"uk":{"title":false,"content":false,"excerpt":false}}},"_links":{"self":[{"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/posts\/402"}],"collection":[{"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/comments?post=402"}],"version-history":[{"count":1,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/posts\/402\/revisions"}],"predecessor-version":[{"id":403,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/posts\/402\/revisions\/403"}],"wp:attachment":[{"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/media?parent=402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/categories?post=402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sergilehkyi.com\/es\/wp-json\/wp\/v2\/tags?post=402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}