Answers for "extract column of n array"

0

extract column of n array

import numpy as np
 
the_arr = np.array([[0, 1, 2, 3, 5, 6, 7, 8],
                    [4, 5, 6, 7, 5, 3, 2, 5],
                    [8, 9, 10, 11, 4, 5, 3, 5]])
 
 
print(the_arr[:, 1])
Posted by: Guest on May-03-2022
0

extract column of n array

import numpy as np
 
the_arr = np.array([[0, 1, 2, 3, 5, 6, 7, 8],
                    [4, 5, 6, 7, 5, 3, 2, 5],
                    [8, 9, 10, 11, 4, 5, 3, 5]])
 
 
print(the_arr[:, 1:5])
Posted by: Guest on May-03-2022
0

extract column of n array

import numpy as np
 
the_arr = np.array([[0, 1, 2, 3, 5, 6, 7, 8],
                    [4, 5, 6, 7, 5, 3, 2, 5],
                    [8, 9, 10, 11, 4, 5, 3, 5]])
 
 
print(the_arr[0:2, 1:3])
Posted by: Guest on May-03-2022

Python Answers by Framework

Browse Popular Code Answers by Language