What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
The program will print:
1 | The array shape is (20, 3) |
Testing if the previous output contains the string The array shape is (3, 20)
: False
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
This program will print:
1 | The array shape is (20, 3) |
Testing if the previous output contains the string The array shape is (3, 20)
: False
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
The program will print:
1 | The array shape is (20, 3) |
Testing if the previous output contains the string The array shape is (3, 20)
: False
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
The program will print:
1 | The array shape is (20, 3) |
Testing if the previous output contains the string The array shape is (3, 20)
: False
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
What will this program print:
1 2 3 4 5 6 | import numpy as np array = np.zeros((10, 20, 30)) idxs = [1, 2, 3] print("The array shape is", array[0, :, idxs].shape) |
The program will print:
1 | The array shape is (20, 3) |
Testing if the previous output contains the string The array shape is (3, 20)
: False