{"id":965,"date":"2024-06-26T07:00:32","date_gmt":"2024-06-26T07:00:32","guid":{"rendered":"https:\/\/poyesis.fr\/blogs\/?p=965"},"modified":"2025-02-03T07:55:16","modified_gmt":"2025-02-03T07:55:16","slug":"version-numpy-2-0","status":"publish","type":"post","link":"https:\/\/poyesis.fr\/blogs\/version-numpy-2-0\/","title":{"rendered":"NumPy 2.0 sort enfin apr\u00e8s 18 ans, on fait le point"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">18 ans.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u2019est le nombre d\u2019ann\u00e9es qui s\u2019est \u00e9coul\u00e9 depuis la release de numpy 1.0.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Numpy est un peu le couteau de suisse des math\u00e9matiques sous Pythons. Gr\u00e2ce \u00e0 cette biblioth\u00e8que, vous pouvez g\u00e9rer simplement des matrices, des polyn\u00f4mes et toute une kyrielle de fonctions math\u00e9matiques.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Tous ceux qui font des maths l&rsquo;utilisent. Des statisticiens. Des data scientists. Des professionnels du machine learning et j\u2019en passe.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Des versions mineures se sont succ\u00e9d\u00e9 entre temps.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Mais cette fois-ci, la communaut\u00e9 derri\u00e8re le projet \u00e0 juger les changements trop importants pour rester dans une version 1.xx.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Et ils ont eu raison au vu de ce que la nouvelle version de biblioth\u00e8que propose.<\/span><\/p>\n<h2><b>Quelques nouvelles fonctionnalit\u00e9s de NumPy 2.0<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Sans transition, voici quelques-unes des annonces les plus marquantes de Numpy 2.0 :<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">un nouveau type de cha\u00eene de longueur variable StringDType ;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">un nouvel espace de noms numpy.strings avec des ufuncs plus performantes ;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">une nouvelle API de tra\u00e7age opt_func_info ;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">la possibilit\u00e9 d\u2019utiliser des objets Pickle d\u00e9passant 4GB ;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">l\u2019am\u00e9lioration de l\u2019API C et la migration du code C vers le langage de programmation C++ ;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">une plus grande vitesse d\u2019ex\u00e9cution gr\u00e2ce aux biblioth\u00e8ques x86-simd-sort, Google Highway et Apple Accelerate.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Cette liste est tr\u00e8s loin d\u2019\u00eatre exhaustive.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Pour voir tous les nouveaux ajouts de NumPy 2.0, <\/span><a href=\"https:\/\/numpy.org\/doc\/stable\/release\/2.0.0-notes.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">rendez-vous sur la page d\u00e9di\u00e9e \u00e0 l\u2019annonce<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h2><b>Pas de r\u00e9trocompatibilit\u00e9 avec les versions 1.x de NumPy<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Oui, vous avez bien lu.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Certains composants utilisant l\u2019API C de NumPy ne vont tout simplement plus fonctionner.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Les d\u00e9veloppeurs du projet ont anticip\u00e9 \u00e7a et vous proposent un mode ruff pour faciliter la migration de votre code-source sous NumPy 2.0.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Et vous recevrez parfois des messages d\u2019erreurs vous indiquant quoi faire.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Mais parfois \u00e7a ne marchera pas.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Si c\u2019est votre cas, faites un tour sur <\/span><a href=\"https:\/\/numpy.org\/devdocs\/numpy_2_0_migration_guide.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">le guide de migration du site officiel de NumPy.<\/span><\/a><\/p>\n<p><a href=\"https:\/\/poyesis.fr\/contactez-nous\/\"><span style=\"font-weight: 400;\">Ou contactez notre chef de projet informatique<\/span><\/a><span style=\"font-weight: 400;\"> pour \u00e9viter un arr\u00eat brutal de vos services.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>18 ans. C\u2019est le nombre d\u2019ann\u00e9es qui s\u2019est \u00e9coul\u00e9 depuis la release de numpy 1.0. Numpy est un peu le couteau de suisse des math\u00e9matiques sous Pythons. Gr\u00e2ce \u00e0 cette biblioth\u00e8que, vous pouvez g\u00e9rer simplement des matrices, des polyn\u00f4mes et toute une kyrielle de fonctions math\u00e9matiques. Tous ceux qui font des maths l&rsquo;utilisent. Des statisticiens. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":966,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jnews-multi-image_gallery":[],"jnews_single_post":{"format":"standard","override":[{"template":"7","single_blog_custom":"553","parallax":"1","fullscreen":"1","layout":"no-sidebar-narrow","sidebar":"default-sidebar","second_sidebar":"default-sidebar","sticky_sidebar":"1","share_position":"floatbottom","share_float_style":"share-normal","show_share_counter":"1","show_view_counter":"1","show_featured":"1","show_post_meta":"1","show_post_author":"1","show_post_author_image":"1","show_post_date":"1","post_date_format":"default","post_date_format_custom":"Y\/m\/d","show_post_category":"1","post_reading_time_wpm":"300","post_calculate_word_method":"str_word_count","show_zoom_button":"0","zoom_button_out_step":"2","zoom_button_in_step":"3","number_popup_post":"1","show_post_related":"1"}],"image_override":[{"single_post_thumbnail_size":"crop-500","single_post_gallery_size":"crop-500"}],"trending_post_position":"meta","trending_post_label":"Trending","sponsored_post_label":"Sponsored by","disable_ad":"0","subtitle":""},"jnews_primary_category":[],"jnews_override_bookmark_settings":{"override_bookmark_button":"0","override_show_bookmark_button":"0"},"jnews_override_counter":{"view_counter_number":"0","share_counter_number":"0","like_counter_number":"0","dislike_counter_number":"0"},"footnotes":""},"categories":[113],"tags":[236,199,237,238],"class_list":["post-965","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-actualite","tag-2-0","tag-developpeurs","tag-numpy","tag-python"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/posts\/965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/comments?post=965"}],"version-history":[{"count":1,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/posts\/965\/revisions"}],"predecessor-version":[{"id":1179,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/posts\/965\/revisions\/1179"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/media\/966"}],"wp:attachment":[{"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/media?parent=965"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/categories?post=965"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/poyesis.fr\/blogs\/wp-json\/wp\/v2\/tags?post=965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}