• Welcome to the world's largest Chinese hacker forum

    Welcome to the world's largest Chinese hacker forum, our forum registration is open! You can now register for technical communication with us, this is a free and open to the world of the BBS, we founded the purpose for the study of network security, please don't release business of black/grey, or on the BBS posts, to seek help hacker if violations, we will permanently frozen your IP and account, thank you for your cooperation. Hacker attack and defense cracking or network Security

    business please click here: Creation Security  From CNHACKTEAM

名词短语和名词短语的用法分析


Recommended Posts

Np.r_就是把两个矩阵按列连接起来,也就是把两个矩阵上下相加,列数相等。

Np.c_就是把两个矩阵按行连接起来,也就是左右两个矩阵相加,行数相等。

参见具体示例:

1.名词短语的用法。C _

a=np.array([[1,2,3],[7,8,9]])

b=np.array([[4,5,6],[1,2,3]])

a

[4]:

数组([[1,2,3],

[7, 8, 9]])

b

[5]:

数组([[4,5,6],

[1, 2, 3]])

c=np.c_[a,b]

c

[7]:

数组([[1,2,3,4,5,6],

[7, 8, 9, 1, 2, 3]])

d=np.array([7,8,9])

e=np.array([1,2,3])

f=np.c_[d,e]

f

[12]:

数组([[7,1],

[8, 2],

[9, 3]])

2.名词短语的用法。R _

a=np.array([[1,2,3],[7,8,9]])

b=np.array([[4,5,6],[1,2,3]])

d=np.array([7,8,9])

e=np.array([1,2,3])

g=np.r_[a,b]

g

[14]:

数组([[1,2,3],

[7, 8, 9],

[4, 5, 6],

[1, 2, 3]])

h=np.r_[d,e]

h

Out[16]:数组([7,8,9,1,2,3])

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now