Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

delete specific indeces from numpy array

# Create a Numpy array from list of numbers
arr = np.array([4, 5, 6, 7, 8, 9, 10, 11])
# Delete element at index positions 1,2 and 3
arr = np.delete(arr, [1,2,3])
Comment

PREVIOUS NEXT
Code Example
Python :: how to find if user input is lower case or upper case in python 
Python :: df drop index 
Python :: extract column numpy array python 
Python :: python zip extract directory 
Python :: python program to print prime numbers in an interval 
Python :: python from timestamp to string 
Python :: replace a string in a list 
Python :: python async await 
Python :: tkinter button foreground color click 
Python :: python datetime no milliseconds 
Python :: sqlite3 python parameterized query 
Python :: pandas add two string columns 
Python :: copy a list python 
Python :: write text in list to text file python 
Python :: python pandas remove non-numeric characters from multiple columns 
Python :: django rest framework 
Python :: pandas apply pass in arguments 
Python :: make dataframe index a column 
Python :: python dictionary get key by value 
Python :: python remove background 
Python :: tkinter how to move button 
Python :: Python Tkinter timer animation 
Python :: assigning values in python 
Python :: get flask version 
Python :: how to merge more than 2 dataframes in python 
Python :: remove duplicates python 
Python :: dir template 
Python :: boto signed url 
Python :: pandas dataframe total row 
Python :: how to write to the end of a file in python 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =