On Fri, Jul 1, 2011 at 6:38 PM, Thomas K Gamble wrote:
> > On Thu, Jun 30, 2011 at 11:32 AM, 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:
> On Thu, Jun 30, 2011 at 11:32 AM, 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
On Thu, Jun 30, 2011 at 11:32 AM, 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 = array
> 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 wha
>
> 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 t
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 t
> 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 = array((256,
2011/6/30 Thomas K Gamble
> 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
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 = arr
10 matches
Mail list logo