numpy.insert not working in .py files

20 views
Skip to first unread message

baylor....@neuro.fchampalimaud.org

unread,
May 12, 2017, 3:27:31 PM5/12/17
to spyder
Hi,
I am trying to run the following code to add to an existing array. When i run the commands in a terminal, it works. However, when I try compiling an .np file, the function fails. Here is an example of what I am trying to do

import numpy as np

packet_time=np.zeros((1000),dtype=np.int)

for x in packet_time:
   
    if packet_time[x] != 6:

        np.insert(packet_time,packet_time[x],666

Thanks for any help

Reply all
Reply to author
Forward
0 new messages