Happens to me all the time...
On Sat, Apr 16, 2011 at 8:51 PM, Forrest Sheng Bao
wrote:
> Oh yeah, my bad. Forget about it. I guess I was too tired.
>
> Cheers, Forrest
>
> On Sat, Apr 16, 2011 at 10:47 PM, Nathaniel Smith wrote:
>>
>> On Sat, Apr 16, 2011 at 8:39 PM, Forrest Sheng Bao
>> wrote
Oh yeah, my bad. Forget about it. I guess I was too tired.
Cheers, Forrest
On Sat, Apr 16, 2011 at 10:47 PM, Nathaniel Smith wrote:
> On Sat, Apr 16, 2011 at 8:39 PM, Forrest Sheng Bao
> wrote:
> a=zeros((3,3)) + eye(3)
> a*a
> > array([[ 1., 0., 0.],
> >[ 0., 1., 0.],
>
On Sat, Apr 16, 2011 at 8:39 PM, Forrest Sheng Bao
wrote:
a=zeros((3,3)) + eye(3)
a*a
> array([[ 1., 0., 0.],
> [ 0., 1., 0.],
> [ 0., 0., 1.]])
>
> Then i assigned a value to one of the element:
>
a[1,2]=4
>
> Finally, the '*' operator was interpreted as a matri
hi,
I encountered a very weird problem tonight. First I created an array and did
element-wise multiplication on it:
>>> a=zeros((3,3)) + eye(3)
>>> a*a
array([[ 1., 0., 0.],
[ 0., 1., 0.],
[ 0., 0., 1.]])
Then i assigned a value to one of the element:
>>> a[1,2]=4
Finally,
On Saturday, April 16, 2011, Laszlo Nagy wrote:
>
> Hi All,
>
> I have this example program:
>
> import numpy as np
> import numpy.random as rnd
>
> def dim_weight(X):
> weights = X[0]
> volumes = X[1]*X[2]*X[3]
> res = np.empty(len(volumes), dtype=np.double)
> for i,v in en
Hi All,
I have this example program:
import numpy as np
import numpy.random as rnd
def dim_weight(X):
weights = X[0]
volumes = X[1]*X[2]*X[3]
res = np.empty(len(volumes), dtype=np.double)
for i,v in enumerate(volumes):
if v>5184:
res[i] = v/194.0