[Numpy-discussion] Some help on matlab to numpy translation

Friedrich Romstedt friedrichromstedt@gmail....
Tue Mar 16 16:01:44 CDT 2010


Ok, maybe can you print shape of the {rho} array as calculated my
matlab?  I know that sum() in matlab sums over rows (i.e., the first
dimension), but I'm curious if it returns for an, say, (10x20) array
an (20,) array or an (1, 20) array.

And to Josef: cx is an 1d vector, so no.  And Hmmm ... most of the
operations are .* in matlab, so element-wise multiplication.  There is
only one matrix product involved, as far as I see, and this has been
replaced by a tensordot(...) ...

So far,
Friedrich

2010/3/15 Nicolas Rougier <Nicolas.Rougier@loria.fr>:
> Thanks and in fact, I already wasted quite some time on and your last version will help me a lot. Unfortunately, I'm not a specialist at lattice Boltzmann methods at all so I'm not able to answer your questions (my initial idea was to convert the matlab script to be have a running example to get some starting point). Also, I found today some computers in the lab to test the matlab version and it seems to run as advertised on the site. I  now need to run both versions side by side and to check where are the differences. I will post sources as soon as I get it to run properly.


More information about the NumPy-Discussion mailing list