Horje
remove element from np array Code Example
remove element from np array
import numpy as np

a = np.array([1, 2, 3, 4, 5, 6, 7, 8, 9])
index = [2, 3, 6]

new_a = np.delete(a, index)

print(new_a) #Prints `[1, 2, 5, 6, 8, 9]`
python remove one element from numpy array
numpy.delete(a, index)




16

Related
what is strikethrough in markdown Code Example what is strikethrough in markdown Code Example
invoke-webrequest download file Code Example invoke-webrequest download file Code Example
how to download file in powershell Code Example how to download file in powershell Code Example
see if two strings are equal in C Code Example see if two strings are equal in C Code Example
how to get user input in c Code Example how to get user input in c Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10