On Wed, Feb 11, 2015 at 9:19 AM, Sebastian Berg <sebast...@sipsolutions.net> wrote:
> On Mi, 2015-02-11 at 11:38 -0500, cjw wrote: > No, I just mean the fact that a matrix is always 2D. This makes some > things like some indexing operations awkward and some functions that > expect a numpy array (but think they can handle subclasses fine) may > just plain brake. And then ndarray subclasses are just a bit > problematic.... > Indeed. In my opinion, a "fixed" version of np.matrix should (1) not be a np.ndarray subclass and (2) exist in a third party library not numpy itself. I don't think it's really feasible to fix np.matrix in its current state as an ndarray subclass, but even a fixed matrix class doesn't really belong in numpy itself, which has too long release cycles and compatibility guarantees for experimentation -- not to mention that the mere existence of the matrix class in numpy leads new users astray. If you're really excited about using matrix objects, I really would recommend starting a new project to implement the functionality (or maybe such a project already exists -- I don't know). Numpy has some excellent hooks for non-ndarray ndarray-like objects, so it's pretty straightforward to integrate with numpy ufuncs, etc.
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion