Right, I forgot to point out that there are at least 2 ways to bring the
arrays into compatible shapes (that's the reason broadcasting does not
work here, because numpy only does automatic broadcasting if there is an
unambiguous way to do so). So the IDL arrays being Fortran-ordered is the
On 30.06.2011, at 11:57PM, Thomas K Gamble wrote:
np.add(b.reshape(2048,3136) * c, d, out=a[:,:3136])
But to say whether this is really the equivalent result to what IDL
does, one would have to study the IDL manual in detail or directly
compare the output (e.g. check what happens to
On Thu, Jun 30, 2011 at 11:32 AM, Thomas K Gamble
tkgam...@windstream.netwrote:
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a = array((2048,3577),
On Thu, Jun 30, 2011 at 11:32 AM, Thomas K Gamble
tkgam...@windstream.netwrote:
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a =
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a = array((2048,3577), dtype=float)
b = array((256,25088), dtype=float)
c = array((2048,3136), dtype=float)
d =
2011/6/30 Thomas K Gamble tkgam...@windstream.net
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a = array((2048,3577), dtype=float)
b = array((256,25088),
On 30.06.2011, at 7:32PM, Thomas K Gamble wrote:
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a = array((2048,3577), dtype=float)
b =
On 30.06.2011, at 7:32PM, Thomas K Gamble wrote:
I'm trying to convert some IDL code to python/numpy and i'm having some
trouble understanding the rules for boradcasting during some operations.
example:
given the following arrays:
a = array((2048,3577), dtype=float)
b =
On 30.06.2011, at 11:57PM, Thomas K Gamble wrote:
np.add(b.reshape(2048,3136) * c, d, out=a[:,:3136])
But to say whether this is really the equivalent result to what IDL does,
one would have to study the IDL manual in detail or directly compare the
output (e.g. check what happens to the