Closed
Description
I think it's pretty nasty and unexpected to have cube.transpose() modify in-place
That is, especially, as it seems to mimic numpy "transpose", which is not in-place.
Plus, we just don't have many in-place operations, largely by design (I think).
Thus in #2604 ...
- I had a test cube and a sample result array which should match a derived coordinate.
- I applied transpose operations to both, but the cube behaves differently to the result, when it should have been the same.
I think we should review this as it's peculiar and unexpected, and breaks the general simlilarity with numpy.
Arguably the numpy function could more clearly be named "transposed" (a la Python "sorted").
Obviously, that ship has sailed, but we could use that naming for a cube method.
Propose:
- provide copying version called "cube.transposed()" instead
- deprecating the existing "cube.transpose" -- or simply remove it from Iris 2.0 ??