79644695

Date: 2025-05-29 22:36:34
Score: 1
Natty:
Report link

to print just the first part of the 3d numpy array as a 2d grid, you can index into the first 2d array using M[0].

M = np.array([[[3,3,3], [3,3,3], [3,3,3]], [[4,4,4], [4,4,4], [4,4,4]]])

#print the first 2d part
for row in M[0]:
    print(' '.join(map(str, row)))

output:

3 3 3
3 3 3
3 3 3
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: tpmam