Answers for "get column from numpy array"

1

extract column numpy array python

# Extract/ Slice only the 3rd column from the numpy array
print(a2[:,[2]])
Posted by: Guest on October-16-2020
0

select a column of numpy array

test = numpy.array([
  [1, 2], [3, 4], [5, 6]
])

>>> test[:,0]
array([1, 3, 5])

>>> test[:,[0]]
array([[1],
       [3],
       [5]])
Posted by: Guest on June-13-2021
0

how to extract column from numpy array

print(a2[:,[2]])
Posted by: Guest on May-10-2021

Code answers related to "get column from numpy array"

Python Answers by Framework

Browse Popular Code Answers by Language