Answers for "remove the first 7 elements in numpy array"

0

how to remove first row of numpy array

x = numpy.delete(x, (0), axis=0)
Posted by: Guest on October-13-2020
2

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]`
Posted by: Guest on November-19-2020
0

remove all the elements from a numpy array python

np_array = np.array([])
Posted by: Guest on January-08-2021

Code answers related to "remove the first 7 elements in numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language