Hi all, I have a method which builds a single 3d ndarray from several equal-dimension 2d ndarrays, and another method which extracts the original 2d ndarrays back out from the 3d one.
The way I'm doing this right now is pretty simple, e.g.: cube = np.asarray([arr1, arr2,...]) ... x = cube[0] I believe the way this is currently handled, is to use new memory locations first for the 3d array, and then later for the 2d slices. Does anyone know if there is a better way to handle this? Ideally, I would like to reuse the same memory locations instead of copying it anew each time. Also, when subclassing ndarray and calling obj = data.view(cls) for an ndarray "data", does this copy the data into the new object by value or reference? The method which extracts the 2d slice actually returns a subclass of ndarray created using the extracted data, so this is why I ask. Any insight or suggestions would be appreciated. Thanks! Keith
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
