{"id":571,"date":"2020-12-28T19:51:45","date_gmt":"2020-12-28T19:51:45","guid":{"rendered":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/?post_type=chapter&#038;p=571"},"modified":"2020-12-28T19:51:45","modified_gmt":"2020-12-28T19:51:45","slug":"kokkuvote-numpy-kahemootmelistest-jarjenditest","status":"publish","type":"chapter","link":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/chapter\/kokkuvote-numpy-kahemootmelistest-jarjenditest\/","title":{"raw":"Kokkuv\u00f5te NumPy kahem\u00f5\u00f5tmelistest j\u00e4rjenditest","rendered":"Kokkuv\u00f5te NumPy kahem\u00f5\u00f5tmelistest j\u00e4rjenditest"},"content":{"raw":"<h2>Kokkuv\u00f5ttev tabel<\/h2>\r\nAllpool on kokkuv\u00f5ttev tabel NumPy kahem\u00f5\u00f5tmeliste j\u00e4rjendite peamiste funktsioonide ja tehete kohta, mida on kirjeldatud selles materjalis.\r\n<table class=\"grid aligncenter\" style=\"border: 2px solid #ebebeb;height: 516px\">\r\n<tbody>\r\n<tr style=\"height: 14px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 14px;width: 332.062px\"><\/td>\r\n<td style=\"text-align: center;vertical-align: middle;border: 2px solid #ebebeb;height: 14px;width: 203.062px\"><strong>NumPy lause<\/strong><\/td>\r\n<td style=\"text-align: center;vertical-align: middle;border: 2px solid #ebebeb;height: 14px;width: 108.062px\"><strong>V\u00e4ljund<\/strong><\/td>\r\n<\/tr>\r\n<tr style=\"height: 16px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 332.062px\">J\u00e4rjendi loomine<\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1,2,3],[4,5,6]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[[1 2 3][4 5 6]]<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi m\u00f5\u00f5tmete leidmine\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3], [4, 5, 6]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a.shape<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">(2, 3)<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">Kahem\u00f5\u00f5tmelisest j\u00e4rjendist elemendi v\u00f5tmine\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3],[4, 5, 6]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[1, 2]<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">6<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi suurim v\u00e4\u00e4rtus\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">np.amax(a)<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">3<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi v\u00e4him v\u00e4\u00e4rtus\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">np.amin(a)<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">1<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"height: 57px;width: 332.062px\">J\u00e4rjendisse elemendi lisamine\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[8, 9, 7], [10, 11, 12]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a = np.append(a, 4)<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[8 9 7 10 11 12 4]<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi teine rida\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3, 4],[5, 6, 7, 8]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[1, :]<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[5 6 7 8]<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 57px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi teine kuni neljas veerg\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3, 4],[5, 6, 7, 8]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[:, 1:4]<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[[2, 3, 4],<\/code>\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[6, 7, 8]]<\/code><\/td>\r\n<\/tr>\r\n<tr style=\"height: 87px\">\r\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 332.062px\">J\u00e4rjendite liitmine\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2],[4, 6]])<\/code>\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">b = np.array([[3, 5],[1, 0]])<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a + b<\/code><\/td>\r\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">[[4, 7],<\/code>\r\n\r\n<code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[5, 6]]<\/code><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>","rendered":"<h2>Kokkuv\u00f5ttev tabel<\/h2>\n<p>Allpool on kokkuv\u00f5ttev tabel NumPy kahem\u00f5\u00f5tmeliste j\u00e4rjendite peamiste funktsioonide ja tehete kohta, mida on kirjeldatud selles materjalis.<\/p>\n<table class=\"grid aligncenter\" style=\"border: 2px solid #ebebeb;height: 516px\">\n<tbody>\n<tr style=\"height: 14px\">\n<td style=\"border: 2px solid #ebebeb;height: 14px;width: 332.062px\"><\/td>\n<td style=\"text-align: center;vertical-align: middle;border: 2px solid #ebebeb;height: 14px;width: 203.062px\"><strong>NumPy lause<\/strong><\/td>\n<td style=\"text-align: center;vertical-align: middle;border: 2px solid #ebebeb;height: 14px;width: 108.062px\"><strong>V\u00e4ljund<\/strong><\/td>\n<\/tr>\n<tr style=\"height: 16px\">\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 332.062px\">J\u00e4rjendi loomine<\/td>\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1,2,3],[4,5,6]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 16px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[[1 2 3][4 5 6]]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi m\u00f5\u00f5tmete leidmine<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3], [4, 5, 6]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a.shape<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">(2, 3)<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">Kahem\u00f5\u00f5tmelisest j\u00e4rjendist elemendi v\u00f5tmine<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3],[4, 5, 6]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[1, 2]<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">6<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi suurim v\u00e4\u00e4rtus<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">np.amax(a)<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">3<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi v\u00e4him v\u00e4\u00e4rtus<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([1, 2, 3])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">np.amin(a)<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">1<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"height: 57px;width: 332.062px\">J\u00e4rjendisse elemendi lisamine<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[8, 9, 7], [10, 11, 12]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a = np.append(a, 4)<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[8 9 7 10 11 12 4]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi teine rida<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3, 4],[5, 6, 7, 8]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[1, :]<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[5 6 7 8]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 57px\">\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 332.062px\">J\u00e4rjendi teine kuni neljas veerg<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2, 3, 4],[5, 6, 7, 8]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a[:, 1:4]<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 57px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[[2, 3, 4],<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[6, 7, 8]]<\/code><\/td>\n<\/tr>\n<tr style=\"height: 87px\">\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 332.062px\">J\u00e4rjendite liitmine<\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">a = np.array([[1, 2],[4, 6]])<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">b = np.array([[3, 5],[1, 0]])<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 203.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">a + b<\/code><\/td>\n<td style=\"border: 2px solid #ebebeb;height: 87px;width: 108.062px\"><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"bootstrap4\">[[4, 7],<\/code><\/p>\n<p><code class=\"EnlighterJSRAW\" data-enlighter-language=\"python\">[5, 6]]<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"author":16,"menu_order":12,"template":"","meta":{"pb_show_title":"on","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[],"contributor":[],"license":[],"class_list":["post-571","chapter","type-chapter","status-publish","hentry"],"part":90,"_links":{"self":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapters\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/wp\/v2\/users\/16"}],"version-history":[{"count":2,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapters\/571\/revisions"}],"predecessor-version":[{"id":574,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapters\/571\/revisions\/574"}],"part":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/parts\/90"}],"metadata":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapters\/571\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/wp\/v2\/media?parent=571"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/pressbooks\/v2\/chapter-type?post=571"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/wp\/v2\/contributor?post=571"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/web.htk.tlu.ee\/digitaru\/tarkvara2\/wp-json\/wp\/v2\/license?post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}