On Sat, Sep 26, 2009 at 18:17, Erik Tollerud wrote:
>> I'm sure you mean np.multiply.reduce().
> Yes, sorry - typo.
>
>>> Or, if there's a better way to just start with the first 3 1d
>>> vectorsand jump straight to the broadcast product (basically, an outer
>>> product over arbitrary number of di
> I'm sure you mean np.multiply.reduce().
Yes, sorry - typo.
>> Or, if there's a better way to just start with the first 3 1d
>> vectorsand jump straight to the broadcast product (basically, an outer
>> product over arbitrary number of dimensions...)?
>
> Well, numpy doesn't support arbitrary numb
On Sat, Sep 26, 2009 at 17:17, Erik Tollerud wrote:
> I'm encountering behavior that I think makes sense, but I'm not sure
> if there's some numpy function I'm unaware of that might speed up this
> operation.
>
> I have a (potentially very long) sequence of vectors, but for
> examples' sake, I'll
I'm encountering behavior that I think makes sense, but I'm not sure
if there's some numpy function I'm unaware of that might speed up this
operation.
I have a (potentially very long) sequence of vectors, but for
examples' sake, I'll stick with three: [A,B,C] with lengths na,nb, and
nc. To get th
Hello David,
thank you.
I followed your suggestion but I was unable to make it work.
I surprisingly found that with numpy in a different folder, it worked.
I am afraid it is due to the fact that the first one is not a linux filesystem
and cannot deal with permission and ownership.
This would make
On Sat, Sep 26, 2009 at 10:33 PM, Thomas Robitaille
wrote:
> Hi,
>
> To convert some bytes to e.g. a 32-bit int, I can do
>
> bytes = f.read(4)
> i = struct.unpack('>i', bytes)[0]
>
> and the convert it to np.int32 with
>
> i = np.int32(i)
>
> However, is there a more direct way of directly transf
Hi,
To convert some bytes to e.g. a 32-bit int, I can do
bytes = f.read(4)
i = struct.unpack('>i', bytes)[0]
and the convert it to np.int32 with
i = np.int32(i)
However, is there a more direct way of directly transforming bytes
into a np.int32 type without the intermediate 'struct.unpack' st
Robert Kern wrote:
> On Fri, Sep 25, 2009 at 17:38, Mads Ipsen wrote:
>
>> Yes, but it should also work for [2.1,3.2,4.5] combined with
>> [4.6,-2.3,5.6] - forgot to tell that.
>>
>
> In [5]: np.transpose(np.meshgrid([2.1,3.2,4.5], [4.6,-2.3,5.6]))
> Out[5]:
> array([[[ 2.1, 4.6],
>