Tag:Matrix stacking

  • Stack instance of Python numpy matrix

    Time:2020-9-29

    In practice, I encountered the operation of matrix stacking. I originally wanted to write a function myself. Later, I thought that there should be a library function, so I searched for it import numpy as np a = np.array([1,2,3]) b = np.array([4,5,6]) np.stack ((a, b)) ා default row stack Output: array([[1, 2, 3], [4, 5, […]