[Numpy-discussion] Migrating from numeric to numpy

Travis Oliphant oliphant at ee.byu.edu
Wed Mar 14 13:08:26 EDT 2007


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




More information about the NumPy-Discussion mailing list