当前位置:网站首页>Four basic data types

Four basic data types

2022-07-28 14:47:00 Youth is short!

# use numpy Realize the expression of basic data 
import numpy as np
# Scalar ( One dimensional tensor )
a = 1
print('a:',a)
print('')
# vector ( Two dimensional tensor )
b = np.array([1,2])
print('b:',b,'\n','b_shape:',b.shape)
print('')
# matrix ( Three dimensional tensor )
c = np.array([[1,1],[1,2]])
print('c:',c,'\n','c_shape:',c.shape)
原网站

版权声明
本文为[Youth is short!]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/196/202207130924595504.html