BlenderPythonRecipes icon indicating copy to clipboard operation
BlenderPythonRecipes copied to clipboard

numpy cheats

Open zeffii opened this issue 3 years ago • 1 comments

convert an array of 2d vectors to 3d vectors. see: https://stackoverflow.com/questions/36878089/python-add-a-column-to-numpy-2d-array

import numpy as np
array_2dvec = np.array([ [x1, y1], [x2, y2], [x3, y3] ])
array_3dvec = np.hstack( (array_2dvec, np.zeros((len(array_2dvec), 1)) ))

zeffii avatar May 12 '22 12:05 zeffii

done

sanketpatel32 avatar May 31 '22 13:05 sanketpatel32