The concatenation of arrays in NumPy

Source: Internet
Author: User
This repo is used to record some python tips, books, learning links, and so on, welcome to star GitHub Address

The scientific computing package in Python numpy is a great extension tool, numpy the most common is the operation of the array Ndarray, part of the operation and Python's built-in list (its stitching is append and extend) overlap, However, to be aware of the use of the way, in addition, for the Ndarray array splicing has its own way. Next, I'll introduce the four types of numpy arrays I know:

Method 1 is a more traditional use, in another pandas library for data operations, which corresponds to the concat, that is, the connection

Method 2 is another shortcut, where h should be horizontal meaning, V should be vertical

Method 3 can also be divided into two categories, where the first category is the second type of abbreviation, but also I prefer the use, because the easiest.

Method 4 is the same as the built-in list, use to pay attention to the setting of the Axis


Although said to master several of the same effect of the operation of a kind of anise beans anise word, there are several ways of writing. The visual sense, but many know how to choose a number of ways to select their favorite one, see other operations also know its role, why not? This repo is used to record some python tips, books, learning links, and so on, welcome to the star GitHub address

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.