Is there a way to combine two 1D arrays with the same size into a 2D array? It seems like the internal pointers and strides could be combined. My primary goal is to not make any copies of the data. It might be doable with a bit of ctypes if there is not a native numpy call.
>>> import numpy as np >>> a = np.array((1,2,3,4)) >>> b = np.array((11,12,13,14)) >>> c = np.magical_fuse(a, b) # what goes here? >>> print c.shape (2, 4) >>> a == c[0] True >>> a[1] = -2 >>> a == c[0] True _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion