Answers for "numpy stack"

0

np.stack

>>> a = np.array([1, 2, 3])
>>> b = np.array([2, 3, 4])
>>> np.stack((a, b))
array([[1, 2, 3],
       [2, 3, 4]])
Posted by: Guest on July-17-2020
0

numpy stack in new dimension

np.stack((R_mat, G_mat, B_mat), axis = 2)
# identify any new dimension as you like
Posted by: Guest on April-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language