Just FYI, the next stable release of Octave (3.6) will have broadcasting. I used Numpy as an inspiration. Here is the WIP manual for it: http://jordi.platinum.linux.pl/octave.html/Broadcasting.html#Broadcasting I want to thank Numpy both for the inspiration and for any comments you may have on this. I'm pretty excited that Octave will now have this feature. Thanks, - Jordi G. H. GNU Octave developer
2011/12/28 Jordi Gutiérrez Hermoso <jordigh@octave.org>
Just FYI, the next stable release of Octave (3.6) will have broadcasting. I used Numpy as an inspiration.
Here is the WIP manual for it:
http://jordi.platinum.linux.pl/octave.html/Broadcasting.html#Broadcasting
That looks good. Should be much nicer to use than bsxfun, so also a good argument to prefer Octave over Matlab. Is this a departure of maintaining full compatibility with Matlab? Ralf I want to thank Numpy both for the inspiration and for any comments
you may have on this. I'm pretty excited that Octave will now have this feature.
Thanks, - Jordi G. H. GNU Octave developer _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion
On 28 December 2011 13:41, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
2011/12/28 Jordi Gutiérrez Hermoso <jordigh@octave.org>
Just FYI, the next stable release of Octave (3.6) will have broadcasting. I used Numpy as an inspiration.
Here is the WIP manual for it:
http://jordi.platinum.linux.pl/octave.html/Broadcasting.html#Broadcasting
Is this a departure of maintaining full compatibility with Matlab?
No, Matlab code will still work in Octave, except in very rare cases, but it's a matter of flipping a switch to make those weird cases work as well. Octave isn't a Matlab clone. The goal is to be source compatible to Matlab: code that runs in Matlab should run in Octave, but we don't try to limit ourselves to whatever Matlab does, nor do we copy every bug unless there's a very good reason to copy its bugs. I think I may be missing a few broadcasting behaviours regarding assignment. Is something like that possible, to broadcast a vector across a matrix during assignment? - Jordi G. H.
2011/12/28 Jordi Gutiérrez Hermoso <jordigh@octave.org>
On 28 December 2011 13:41, Ralf Gommers <ralf.gommers@googlemail.com> wrote:
2011/12/28 Jordi Gutiérrez Hermoso <jordigh@octave.org>
Just FYI, the next stable release of Octave (3.6) will have broadcasting. I used Numpy as an inspiration.
Here is the WIP manual for it:
http://jordi.platinum.linux.pl/octave.html/Broadcasting.html#Broadcasting
Is this a departure of maintaining full compatibility with Matlab?
No, Matlab code will still work in Octave, except in very rare cases, but it's a matter of flipping a switch to make those weird cases work as well.
Octave isn't a Matlab clone. The goal is to be source compatible to Matlab: code that runs in Matlab should run in Octave, but we don't try to limit ourselves to whatever Matlab does, nor do we copy every bug unless there's a very good reason to copy its bugs.
I think I may be missing a few broadcasting behaviours regarding assignment. Is something like that possible, to broadcast a vector across a matrix during assignment?
- Jordi G. H.
Numpy does it: In [12]: x = numpy.zeros((3, 3)) In [15]: x[:] = numpy.arange(3) In [16]: x Out[16]: array([[ 0., 1., 2.], [ 0., 1., 2.], [ 0., 1., 2.]]) -=- Olivier
participants (3)
-
Jordi Gutiérrez Hermoso -
Olivier Delalleau -
Ralf Gommers