is it possible to store references of specific rows of an numpy array in another numpy array?
I have an array of 2D nodes, e.g.
nodes = np.array([[1, 2], [2, 3], [3, 4], [4, 5], [5, 6]])
Now I want to select only a few of them and store a reference in another numpy array:
nn = np.array([nodes[0], nodes[3]])
If I modify a entry in nn
the array nodes
remains unchanged. Is there a way to store a reference to nodes
in the ndarray nn
?