官术网_书友最值得收藏!

Scalar operations

Scalar operations involve a vector (or matrix) and a scalar. To perform an operation with a scalar on a matrix, simply apply to the scalar to every item in the matrix:

In Python, we would simply do the following: 

vector = np.array([[1,2], [1,2]])
new_vector = vector + 2
主站蜘蛛池模板: 隆德县| 哈尔滨市| 新乡市| 京山县| 蒙城县| 长沙县| 三原县| 西安市| 安多县| 台东县| 崇文区| 邢台县| 巴彦淖尔市| 马山县| 宁南县| 安福县| 柳河县| 肥东县| 化隆| 北票市| 缙云县| 体育| 中西区| 鹤壁市| 侯马市| 罗山县| 城市| 襄樊市| 丰原市| 江西省| 澳门| 和顺县| 静安区| 富源县| 和龙市| 皮山县| 南城县| 富宁县| 肇东市| 惠东县| 新营市|