octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: bsxfun optimized


From: Jaroslav Hajek
Subject: Re: FYI: bsxfun optimized
Date: Wed, 12 Jan 2011 16:52:07 +0100

On Tue, Jan 11, 2011 at 3:43 PM, CdeMills <address@hidden> wrote:
>
> Sorry to resurrect an old topic ...
>
> When I try 'center' on a dataframe under 3.3.54+, it fails in bsxfun. Let
> say x is a (3, 4) dataframe; then
> x1 = sum(x, 1)/3
> is a (1, 4) dataframe, and
> bsxfun(@minus, x, x1)
> fails with
> Non-compatible rows and columns size (op1 is 3x4, op2 is 1x4)
>
> So it seems there is an automatic column iteration inside bsxfun: how can I
> make my dataframe class compatible to achieve such iteration ?
>

This should have nothing to do with those optimizations; those should
be bypassed for classes. I recommend you overload bsxfun for dataframe
if you're interested in it at all, because that would probably allow
you to do the operation way more efficiently. But in any case, this
was designed to work, and it doesn't. And the error message even makes
no sense, because 3x4 is bsxfun-compatible with 1x4. I suggest you
file a bug report.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]