NumPy中ndarray类型属性、创建和变换

博客推荐了嵩天的Python课程,给出课程链接,还推荐了练习平台。同时介绍了ndarray的属性,如.ndim、.shape等;创建方法,如np.array()、np.arrange()等;以及变换方法,如.reshape()、.resize()等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Recommend:

        First,I highly recommend 嵩天's classes which is pretty good for guys like us .

Yeah,I have learn a lot from that gentle and tender young man . So,come and learn

python with us .

 

https://www.icourse163.org/learn/BIT-1001870002?tid=1206192225#/learn/content?type=detail&id=1210784853&cid=1213173497&replay=true 

Click this you will enter into songtian's classes .

https://python123.io/index/open

A platform for practice .

 

Point:

 

ndarray的属性:
 .ndim
 .shape
 .size
 .dtype
 .itemsize

 

                        

                       

 

ndarray的创建:
    前提import numpy as np    
    np.array()
    np.arrange()
    np.ones(shape)
    np.zeros()
    np.full(shape,val)
    np.ones_like(a)
    np.zeros_like(a)
    np.full_like(a,val)

 

ndarray的变换:
    .reshape()
    .resize()
    .flatten()

    .astype()

See you next time , ciao !

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值