Migrating from numeric to numpy
13 Mar
2007
13 Mar
'07
4:56 p.m.
So far my migration seems to be going well. I have one problem: I've been using the scipy_base.insert and scipy_base.extract functions and the behavior in numpy is not the same. a = [0, 0, 0, 0] mask = [0, 0, 0, 1] c = [10] numpy.insert(a, mask, c) would change a so that a = [0, 0, 0, 10] This is not what I'm seeing in numpy. Thanks, VJ
14 Mar
14 Mar
10:08 a.m.
vinjvinj wrote:
So far my migration seems to be going well. I have one problem:
I've been using the scipy_base.insert and scipy_base.extract functions and the behavior in numpy is not the same.
a = [0, 0, 0, 0] mask = [0, 0, 0, 1] c = [10]
numpy.insert(a, mask, c)
would change a so that
a = [0, 0, 0, 10]
This is not what I'm seeing in numpy.
scipy_base.insert --> numpy.place -Travis
6278
Age (days ago)
6279
Last active (days ago)
1 comments
2 participants
participants (2)
-
Travis Oliphant
-
vinjvinj