On 9/22/06, Alan G Isaac <[EMAIL PROTECTED]> wrote:
> On Fri, 22 Sep 2006, Bill Baxter apparently wrote:
> > Ok, here's my best shot at a generalized repmat:
>
> Sorry to always repeat this suggestion when
> it comes to repmat, but I think the whole approach
> is wrong.  A repmat should be a separate object type,
> which behaves like the described matrix but has only one
> copy of the repetitive data.

That may be true for some cases.  But I usually start modifying the
data I create right after a repmat.  It wouldn't help in that case.
So unless you're really making a lot of large repmats of arrays that
never change, or for use as temp variables, I can't see a separate
class being that much of a win, compared with the complexity of
implementing and maintaining it (think "fancy indexing").   YMMV.
However, repmat seems to be far less commonly needed in numpy than in
Matlab.  I think that's mostly thanks to the broadcasting rules, which
already create a sort of implicit repmat of the input in many common
cases.

--bb

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to