As part of my process for updating mplot3d, I realized that transforms.py needed to be revamped first. In many places in transforms.py, there were unnecessary 2-D assumptions that needed to be removed or generalized. I have started this effort here:
I still have more to do in this file, but this version passes the unit tests, and I would welcome any comments and thoughts. Part of the efforts have been trying to shoehorn n-d positional arguments into various function signatures. For example:
def foo(self, x, y) :
def foo(self, x, y, *args) :
In some places, like shrunk_to_aspect(), I decided that I would just allow the operation to continue for just the first two dims. In other places, I tried to allow for mis-matches of dimensions with reasonable defaults (e.g., shrunk()).
My main problem in pushing forward right now is that there are functions that have signatures like the following:
def foo(self, x, y, ignorex=True, ignorey=True) :
Unfortunately, it is not until py3k that we can utilize keyword-only arguments that would allow us to place a positional argument in between the *y* and the *ignorex*, and we would run the risk of breaking function calls like "foo(x, y, False, False)" which is valid now. Therefore, I are going to need to introduce some new functions to transforms.py that would allow n-d arguments and deprecate the problematic functions.
Anyway, this is my progress so far. I would welcome any input, thoughts, concerns and such.