<div dir="ltr">On Mon, Feb 10, 2014 at 1:13 PM, Alan G Isaac <span dir="ltr"><<a href="mailto:alan.isaac@gmail.com" target="_blank">alan.isaac@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class="im">Do you mean one must start out with an 'asarray'?<br>

</div>
Or more than that?<br></blockquote><div><br></div><div style>maybe np.asanyarray()<br></div><div><br></div><div style>It's nice, at least in principle for duck-typed functions to return the type they were handed. And this really is the primary issu ewith np.matrix -- it takes some real effort to write code that preserves your objects as the matrix type.</div>

<div style><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">As I detailed in past discussion, the one thing<br>


I really do not like about the `matrix` design<br>
is that indexing always returns a matrix.<br>
</blockquote><div><br></div><div style>And that's the other one -- to be really nice and useful, I think we'd need a row_vector and column_vector type. i.e if you iterate through a matrix, you get a bunch of row_vector instances -- not a bunch of Nx1 matrixes.</div>

<div><br></div><div style>But anyway -- there was a big ol' discussion about this a few years back -- my summary of that is:</div><div style><br></div><div style>1) not very many people use matrix</div><div style>  1a) Those that do, often end up dropping it as their experience develops</div>

<div style>  1b) It is a source of sonfusion -- some argue more confusion than it's worth.</div><div style>2) It might be more useful if it were substantially improved </div><div style>  - some of the subclassing issues</div>

<div style>  - vector types</div><div style>  - ???</div><div style>3) A number of people had some great ideas how to improve it.</div><div style>4) Not a single person with both the skill set and the bandwidth to actually do it has shown any interest for a long time.</div>

<div style><br></div><div style>Given (1) and (4) -- I can see that deprecation might seem to make sense.</div><div style><br></div><div style>However, I am perfectly willing to Accept Alan's assurance that it's a useful teaching tool in some cases as is is. Note that I would argue that it's NOT for "newbies", but rather, useful if you want to provide a computational environment where matrixes make sense, and the point is to teach and work with those concepts, rather than to learn numpy in the broader sense. </div>

<div style><br></div><div style>If the goal is to teach numpy for general use, I don't think you should introduce the matrix object.</div><div style><br></div><div style>-Chris</div><div style><br></div></div><div><br>

</div>-- <br><br>Christopher Barker, Ph.D.<br>Oceanographer<br><br>Emergency Response Division<br>NOAA/NOS/OR&R            (206) 526-6959   voice<br>7600 Sand Point Way NE   (206) 526-6329   fax<br>Seattle, WA  98115       (206) 526-6317   main reception<br>

<br><a href="mailto:Chris.Barker@noaa.gov" target="_blank">Chris.Barker@noaa.gov</a>
</div></div>