NumPy is certainly the white light for many machine learning researchers and developers. How can such an excellent project survive without a Chinese version? Recently, Heart of the Machine discovered that NumPy officially launched a Chinese version website last year, covering everything about NumPy.

NumPy, once the most popular machine learning and data science package on Github, now has a very systematic Chinese document. Back in the days when people had to search for NumPy repeatedly on various search engines and platforms, they might find a very systematic document. For now, if you have any problems with NumPy, just browse through the official Chinese document. It is systematic, comprehensive and accessible. How close to the people? The site is the only one with a “hair loss prevention guide.”




What is NumPy? It is the foundation of scientific computation in Python. It is a major force in data analysis, machine learning, and scientific computation in the Python ecosystem. It greatly simplifies the manipulation of vectors and matrices. In addition to calculations, it includes:
  • Powerful N – dimensional array objects.

  • Precision broadcast function.

  • A tool for integrating C/C+ and Fortran code.

  • Powerful linear algebra, Fourier transform and random number functions

The document also highlights two features, Ndarray and slicing and indexing, that are common in everyday operations.

  • Ndarray: a collection of data of the same type, indexed by the elements of the collection starting with 0 subscript. An Ndarray object is a multidimensional array that holds elements of the same type. Each element in NDARray has an area of memory with the same storage size.

  • Slicing and indexing: The contents of an Ndarray object can be accessed and modified by indexing or slicing, just as a List is slicing in Python. Ndarray arrays can be indexed with subscripts from 0 to n, and slicing objects can be sliced from the original array using the built-in slice function with the start, stop, and step parameters.



Official website: https://www.NumPy.org.cn


The official Chinese project is extensive and has a large number of articles. Heart of the Machine has selected some highlights here for readers’ reference.


Tutorials, documentation, and the Chinese version emphasizes deep learning


From the beginning of the principle, the Chinese version of the introduction to the theory of the plate


This open source official Chinese tutorial is quite comprehensive. It starts with a basic understanding of NumPy and progresses through the tutorial until the user has mastered more advanced ways to use it.


In terms of content, the Chinese version is not only a translation of the official English version, but also an additional section called “articles”. This column provides a detailed explanation of the matrix arithmetic principles behind NumPy so that users “know how and why”. This is not in the English tutorial.


This section introduces the basic theory of NumPy and the theoretical aspects of its application, such as data analysis, neural network implementation, and interfaces in other code bases.


Based on article



  • Understand the NumPy

  • NumPy simple introductory tutorial

  • Python NumPy tutorial

  • Different ways to create NumPy arrays

  • Matrices and vectors in NumPy

Advanced article

  • NumPy data analysis exercises

  • NumPy neural network

  • Array programming using NumPy

  • NumPy implements k-means clustering algorithm

  • NumPy implements DNC, RNN and LSTM neural network algorithms

Other articles

  • Basic operation of images in OpenCV

  • MinPy: NumPy interface to the MXNet backend



We’ve captured some of these articles, and as you can see, it’s not just about what NumPy does, it’s also about how it works.

For the multidimensional array intuitive explanation (part), it can be seen that the official provided a good theoretical explanation and diagrams.



Note the connection with deep learning


On the other hand, NumPy Chinese tutorials have noticed the recent development trend of deep learning, so they have launched a deep learning tutorial combining NumPy and Baidu flying paddle framework. NumPy is more than just a scientific computing tool; it’s an important part of the deep learning community.


The following is the content of this section, as you can see, all the content related to neural networks, including principles and related implementation, has been covered. In this section, there is also a 7-day introduction to deep learning course for the reference of small white users.


Deep learning basics tutorial



  • preface

  • Linear regression

  • Digital recognition

  • Image classification

  • The word vector

  • Personalized recommendation

  • Sentiment analysis

  • Semantic role labeling

  • Machine translation

  • Generative adversarial network

7 days of Deep Learning for beginners (being updated)

  • Day 1: Getting to know deep learning

  • Day 1: How to start Deep learning quickly?

  • Day 2: Basic and practical image recognition

  • Day 3: Object Detection Basics and Practice (I)

  • Day 3: Target detection actual combat -RCNN algorithm explanation

  • Day 3: Target detection combat -YOLOv3 detects objects

Take the following code for example, which is part of a linear regression neural network construction code. As you can see, the code uses NumPy for loading and preprocessing, and uses flying-oars to build related functions for data batching, etc.




feature_names = [    'CRIM'.'ZN'.'INDUS'.'CHAS'.'NOX'.'RM'.'AGE'.'DIS'.'RAD'.'TAX'.'PTRATIO'.'B'.'LSTAT'.'convert']feature_num = len(feature_names)data = np.fromfile(filename, sep=' ') Shape [0] // Feature_num, Feature_num) Maximums, minimums, Avgs = data.max(axis=0) data.min(axis=0), data.sum(axis=0)/data.shape[0]for i in six.moves.range(feature_num-1): data[:, i] = (data[:, I] -avgs [I])/(maximums[I] -minimums [I]) # six. Moves are compatible with PYTHon2 and PYTHon3Ratio = 0.8 # int(data.shape[0]*ratio)train_data = data[:offset]test_data = data[offset:]def reader_creator(train_data): def reader(): for d in train_data: yield d[:-1], d[-1:] return readertrain_reader = paddle.batch( paddle.reader.shuffle( reader_creator(train_data), buf_size=500), batch_size=BATCH_SIZE)test_reader = paddle.batch( paddle.reader.shuffle( reader_creator(test_data), buf_size=500), batch_size=BATCH_SIZE)Copy the code


User documentation and reference manual: Covers everything NumPy


Of course, the core part is of course the documentation for NumPy itself. In The Chinese version, user documentation and all NumPy apis have been translated and sorted out. Basically, what users need can be found here.


The user documentation is listed below, along with a thoughtful comparison with “rival” Matlab, as well as the use of the NumPy API in C.
  • NumPy is introduced

  • Quick Start Tutorial

  • NumPy basics

  • Other miscellaneous

  • Compared with the Matlab

  • Building from source

  • Use NumPy’s C-API

From here you can see that the official Chinese version is really full of sincerity. Not only does it provide translation of the original document, but it also includes deep learning tutorials, features and principles from other sources. This is the perfect tutorial for anyone new to NumPy. Whether self-taught or for development, it’s great.



Other resources and documentation


If this isn’t enough for you? It doesn’t matter, the website also has related articles and videos to keep you fresh in a variety of ways:





In addition, there is a unique guide to prevent hair loss to make you feel safe in the pit:

There is also a separate developer guide for developers, which is a detailed checklist of how to properly configure and use the development environment.
  • NumPy Code of conduct

  • Git tutorial

  • Set up and use your development environment

  • The development process

  • NumPy benchmarks

  • NumPy C Style Guide

  • Release a version

  • NumPy governance



NumPy has a huge user base and a thriving developer community. The Chinese language world is getting more attention in machine learning, judging from the release of Chinese language documentation for open source tools such as PyTorch and NumPy.


In the first phase of “AI Developer Growth Plan”, Machine Heart and Webank jointly opened the open course “Federation Learning FATE Introduction and Application Practice”, and specially invited its partner VMware to bring a total of 6 courses for 4 weeks, including theme explanation, project practice, online q&A and other links, to help AI developers learn federation from zero. Open lecture 3 will begin on March 17th. Please sign up and join us.