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

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
主站蜘蛛池模板: 吉首市| 福海县| 龙岩市| 桑植县| 秦皇岛市| 苗栗市| 屏南县| 汝阳县| 剑河县| 富锦市| 盐源县| 始兴县| 西安市| 犍为县| 抚顺县| 图木舒克市| 田东县| 布尔津县| 明星| 林口县| 淅川县| 三穗县| 远安县| 呼玛县| 达拉特旗| 抚远县| 图木舒克市| 卓尼县| 荣昌县| 松滋市| 皮山县| 三门县| 临猗县| 英吉沙县| 宜都市| 吴忠市| 蕲春县| 班玛县| 托里县| 齐齐哈尔市| 扎囊县|