{"id":271402,"date":"2015-12-30T13:26:03","date_gmt":"2015-12-30T10:26:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=271402"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=271402","title":{"rendered":"Numpy \u0438 \u043c\u043d\u043e\u0433\u043e\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u043d\u043e\u0441\u0442\u044c"},"content":{"rendered":"<p>       \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <i>numpy<\/i> \u0432 \u0441\u0432\u043e\u0438\u0445 python-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 <i>numpy<\/i> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u0437\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442\u2026 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0445\u043e\u0442\u044f \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u0414\u0435\u043b\u043e \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 <i>numpy<\/i> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b. \u0412\u043e\u0442 \u0432 \u043d\u0435\u0439-\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0438 \u043a\u0440\u043e\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0438\u0441\u043f\u0440\u0430\u0432\u0438\u043c\u043e.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u0440\u0438 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438:<\/p>\n<ul>\n<li>\u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043d\u0438\u043a\u0430\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b \u0438 \u0442\u043e\u0433\u0434\u0430 numpy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443, \u0438 \u043e\u043d\u0430, \u043d\u0430\u0434\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u0432\u0435\u0441\u044c\u043c\u0430 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0430\u044f;<\/li>\n<li>\u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0442\u0438\u043f\u0430 ATLAS \u0438 BLAS, \u0438 \u043e\u043d\u0438 \u0443\u043c\u0435\u044e\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440;<\/li>\n<li>\u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 OpenBLAS, MKL \u0438 \u0438\u043c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0435.<\/li>\n<\/ul>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0434\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0442\u0435\u0441\u0442. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0432\u043e\u0442 \u044d\u0442\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443:<\/p>\n<pre><code class=\"python\">import numpy as np size = 10000 a = np.random.random_sample((size, size)) b = np.random.random_sample((size, size)) n = np.dot(a,b) <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e, \u0435\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 Linux, \u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <i>top<\/i>, \u0430 \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0432 Windows, \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0443 \u0432 \u201c\u0411\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u201d \u0432 \u0434\u0438\u0441\u043f\u0435\u0442\u0447\u0435\u0440\u0435 \u0437\u0430\u0434\u0430\u0447 (\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e Ctrl+Shift+Esc)\u2026 \u0415\u0441\u043b\u0438 <i>top<\/i> \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 100%, \u0430 \u0438\u043d\u0434\u0438\u043a\u0430\u0442\u043e\u0440 \u201c\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0426\u041f\u201d \u043d\u0430 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u201c\u0411\u044b\u0441\u0442\u0440\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u201d, \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e \u043d\u0438\u0436\u0435 100%, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0437\u0430\u043d\u044f\u0442\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u043d\u043e \u044f\u0434\u0440\u043e \u2014 \u0438 \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u0434\u043b\u044f \u0432\u0430\u0441. \u0422\u0435, \u0443 \u043a\u043e\u0433\u043e \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b, \u043c\u043e\u0433\u0443\u0442 \u0440\u0430\u0434\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u2014 \u0443 \u043d\u0438\u0445 \u0432\u0441\u0435 \u0432 \u043f\u043e\u0440\u044f\u0434\u043a\u0435 \u2014 \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u0447\u0438\u0442\u0430\u0442\u044c.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Windows<\/h5>\n<p>  \u0422\u0435\u043e\u0440\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043c\u043e\u0436\u043d\u043e, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043d\u0430\u0439\u0442\u0438 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043f\u0435\u0440\u0435\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c <i>numpy<\/i>. \u042f \u0434\u0430\u0436\u0435 \u0441\u043b\u044b\u0448\u0430\u043b, \u0447\u0442\u043e \u043a\u0442\u043e-\u0442\u043e \u043f\u0438\u0441\u0430\u043b, \u0447\u0442\u043e \u043e\u043d \u0432\u0438\u0434\u0435\u043b \u043b\u044e\u0434\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b\u0438, \u0447\u0442\u043e \u0438\u043c \u044d\u0442\u043e \u0443\u0434\u0430\u043b\u043e\u0441\u044c\u2026 \u0412 \u043e\u0431\u0449\u0435\u043c, \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u2014 \u044d\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 Python, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <i><a href=\"https:\/\/www.continuum.io\/why-anaconda\">Anaconda<\/a><\/i> \u0438\u043b\u0438 <i><a href=\"https:\/\/www.enthought.com\/products\/canopy\/\">Canopy<\/a><\/i>. \u0412 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 \u0432\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e <i>python<\/i> \u0438 <i>numpy<\/i>, \u043d\u043e \u0438 \u0446\u0435\u043b\u0430\u044f \u043a\u0443\u0447\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0435\u0442\u043e\u0432 \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. <\/p>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0432\u043e\u0437\u0440\u043e\u0441\u043b\u0430 \u0432 \u0440\u0430\u0437\u044b.<\/p>\n<h5>\u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f Linux<\/h5>\n<p>  \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432 <i>Anaconda<\/i>, <i>Canopy<\/i> \u0438\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0434\u0440\u0443\u0433\u043e\u0435 \u0441\u0440\u0430\u0437\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438. \u041d\u043e \u0435\u0441\u043b\u0438 \u043f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u0442\u0435 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u043c\u0438 \u0440\u0443\u043a\u0430\u043c\u0438, \u0442\u043e \u0447\u0438\u0442\u0430\u0439\u0442\u0435 \u0434\u0430\u043b\u044c\u0448\u0435 \u2014 \u0442\u0430\u043c \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0440\u0435\u0446\u0435\u043f\u0442\u044b.<\/p>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h3>\n<p>  \u041a\u0430\u043a \u0432\u044b \u043f\u043e\u043c\u043d\u0438\u0442\u0435, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u0434\u0432\u0430 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430:<\/p>\n<ul>\n<li>\u0443 \u0432\u0430\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u201c\u043e\u043b\u0434\u0441\u043a\u0443\u043b\u044c\u043d\u044b\u0435\u201d (\u0438\u043b\u0438 \u201c\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0438\u0435\u201d, \u043a\u043e\u043c\u0443 \u043a\u0430\u043a \u043d\u0440\u0430\u0432\u0438\u0442\u0441\u044f) \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, ATLAS);<\/li>\n<li>\u0443 \u0432\u0430\u0441 \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0438 numpy \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0443\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 (\u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0435\u0449\u0435 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435)<\/li>\n<\/ul>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 \u0441\u0432\u0435\u0436\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f <i>numpy<\/i> (&gt;1.10), \u0442\u043e, \u0437\u0430\u0439\u0434\u044f \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433, \u043a\u0443\u0434\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d numpy (\u043e\u0431\u044b\u0447\u043d\u043e \u044d\u0442\u043e <i>\/usr\/local\/lib\/python2.7\/dist-packages\/numpy<\/i>, \u043d\u043e \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0432\u0435\u0440\u0441\u0438\u0438 Linux \u0438 Python \u043f\u0443\u0442\u044c \u043c\u043e\u0436\u0435\u0442 \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f) \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438:<\/p>\n<pre><code class=\"bash\">cd core ldd multiarray.so <\/code><\/pre>\n<p>  \u0412 \u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u043d\u043d\u0438\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 <i>numpy<\/i> \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 <i>multiarray.so<\/i> \u043d\u0435\u0442, \u0437\u0430\u0442\u043e \u0435\u0441\u0442\u044c <i>_dotblas.so<\/i>:<\/p>\n<pre><code class=\"bash\">ldd _dotblas.so <\/code><\/pre>\n<p>  \u0412\u044b\u0432\u043e\u0434 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <i>ldd<\/i> \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u0432\u0430\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u043b\u0438 <i>numpy<\/i> \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b.<\/p>\n<pre><code class=\"bash\">linux-vdso.so.1 =&gt;  (0x00007fffe58a2000) libm.so.6 =&gt; \/lib\/x86_64-linux-gnu\/libm.so.6 (0x00007f8adbff4000) libpthread.so.0 =&gt; \/lib\/x86_64-linux-gnu\/libpthread.so.0 (0x00007f8adbdd6000) libc.so.6 =&gt; \/lib\/x86_64-linux-gnu\/libc.so.6 (0x00007f8adba10000) \/lib64\/ld-linux-x86-64.so.2 (0x00007f8adc68c000) <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432 \u043b\u0438\u0441\u0442\u0438\u043d\u0433\u0435 \u0432\u044b \u043d\u0435 \u0432\u0438\u0434\u0438\u0442\u0435 <i>libblas.so<\/i>, \u0437\u043d\u0430\u0447\u0438\u0442 \u0432\u0430\u0448\u0430 <i>numpy<\/i> \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0441\u0432\u043e\u044e \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u044e\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443. \u0415\u0441\u043b\u0438 \u0432\u0438\u0434\u0438\u0442\u0435, \u0437\u043d\u0430\u0447\u0438\u0442 \u0443 \u0432\u0430\u0441 \u0441\u0442\u043e\u0438\u0442 ATLAS \u0438\u043b\u0438 BLAS.<\/p>\n<p>  \u0412 \u043b\u044e\u0431\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 OpenBLAS<\/h3>\n<p>  OpenBLAS \u2014 \u0445\u043e\u0440\u043e\u0448\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u043e\u0432 \u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0435\u0436\u0430\u0442 \u0432 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u041f\u0440\u0435\u0436\u0434\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0424\u043e\u0440\u0442\u0440\u0430\u043d\u0430, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 OpenBLAS \u043d\u0435 \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c <i>g77<\/i>.<\/p>\n<pre><code class=\"bash\">sudo apt-get install gfortran <\/code><\/pre>\n<p>  \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 OpenBLAS \u0441 github\u2019\u0430 (\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u0435\u0440\u043d\u0443\u0432\u0448\u0438\u0441\u044c \u0432 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u043a\u0430\u0442\u0430\u043b\u043e\u0433):<\/p>\n<pre><code class=\"bash\">git clone https:\/\/github.com\/xianyi\/OpenBLAS.git <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0439\u0434\u0438\u0442\u0435 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0441\u0431\u043e\u0440\u043a\u0443:<\/p>\n<pre><code class=\"bash\">cd OpenBLAS make FC=gfortran <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0441\u0431\u043e\u0440\u043a\u0430 \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f, \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443.<\/p>\n<pre><code class=\"bash\">sudo make install <\/code><\/pre>\n<p>  \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 <i>\/opt\/OpenBLAS<\/i>. \u0415\u0441\u043b\u0438 \u0432\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0435\u0435 \u0432 \u0434\u0440\u0443\u0433\u043e\u0435 \u043c\u0435\u0441\u0442\u043e, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 <i>make install<\/i> \u0441 \u043a\u043b\u044e\u0447\u043e\u043c <i>PREFIX<\/i>:<\/p>\n<pre><code class=\"bash\">sudo make install PREFIX=\/your\/preferred\/location <\/code><\/pre>\n<p>  <\/p>\n<h3>\u041f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u0432\u044b \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u0438, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u043a\u0430\u043a\u0430\u044f-\u0442\u043e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0433\u0435\u0431\u0440\u044b, \u0442\u043e \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 \u043f\u0435\u0440\u0435\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a:<\/p>\n<pre><code class=\"bash\">sudo update-alternatives --install \/usr\/lib\/libblas.so.3 libblas.so.3 \\ \t\/opt\/OpenBLAS\/lib\/libopenblas.so 50 <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e OpenBLAS \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0441\u0442\u0430\u043d\u0435\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u043e\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0430\u043b\u0435\u0433\u0431\u0440\u044b \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f <i>numpy<\/i>, \u0430 \u0432\u043e\u043e\u0431\u0449\u0435 \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a.<\/p>\n<p>  \u0418 \u0441\u043d\u043e\u0432\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u0442\u0435\u0441\u0442, \u0447\u0442\u043e\u0431\u044b \u0443\u0432\u0438\u0434\u0435\u0442\u044c, \u043a\u0430\u043a \u0443 \u0432\u0430\u0441 \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f\u0445 \u0442\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u044b \u0432\u0441\u0435 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b.<\/p>\n<h3>\u0421\u043e\u0431\u0438\u0440\u0430\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 numpy<\/h3>\n<p>  \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 <i>numpy<\/i> \u0440\u0430\u0431\u043e\u0442\u0430\u043b \u043d\u0430 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0442\u043e \u0432\u0430\u043c \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0435\u0433\u043e \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0440\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0442\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 OpenBLAS.<\/p>\n<p>  \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u0438\u0437\u0431\u0430\u0432\u044c\u0442\u0435\u0441\u044c \u043e\u0442 \u0434\u0435\u0444\u0435\u043a\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438:<\/p>\n<pre><code class=\"bash\">sudo pip uninstall numpy <\/code><\/pre>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0441\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u0432 \u0434\u043e\u043c\u0430\u0448\u043d\u0435\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0444\u0430\u0439\u043b .numpy-site.cfg \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">[default] include_dirs = \/opt\/OpenBLAS\/include library_dirs = \/opt\/OpenBLAS\/lib  [openblas] openblas_libs = openblas include_dirs = \/opt\/OpenBLAS\/include library_dirs = \/opt\/OpenBLAS\/lib  [lapack] lapack_libs = openblas  [atlas] atlas_libs = openblas libraries = openblas <\/code><\/pre>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u044b \u0440\u0430\u043d\u0435\u0435 \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0434\u043b\u044f OpenBLAS, \u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0435 \u043f\u0443\u0442\u0438 \u0432 \u0444\u0430\u0439\u043b\u0435. \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0435 <i>numpy<\/i> \u0437\u0430\u043d\u043e\u0432\u043e:<\/p>\n<pre><code class=\"bash\">sudo pip install numpy <\/code><\/pre>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0442\u0441\u044f, \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u0435 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0442\u0435\u0441\u0442, \u0447\u0442\u043e\u0431\u044b \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440\u044b \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u0430\u0438\u0432\u0430\u044e\u0442. \u0412\u043e\u0442 \u0438 \u0432\u0441\u0435.       <\/p>\n<div class=\"clear\"><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/274331\/\"> http:\/\/habrahabr.ru\/post\/274331\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>       \u0421\u0435\u0439\u0447\u0430\u0441 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443 <i>numpy<\/i> \u0432 \u0441\u0432\u043e\u0438\u0445 python-\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0441\u043a\u043e\u0440\u044f\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 <i>numpy<\/i> \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432 \u0440\u0430\u0437\u044b \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0447\u0435\u043c \u043e\u043d\u0430 \u043c\u043e\u0436\u0435\u0442\u2026 \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440, \u0445\u043e\u0442\u044f \u043c\u043e\u0433\u043b\u0430 \u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-271402","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271402","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=271402"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/271402\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=271402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=271402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=271402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}