#Slicing 3D arrays in numpy

5 messages · Page 1 of 1 (latest)

lapis sinew
#

Im a bit confused on how i slice 3d arrays in NumPy.. the columns and rows are a bit tricky. how do i distinguish which is which

untold daggerBOT
#

Thanks for posting! I can see you're asking about slicing 3D arrays in numpy, but your question is missing some important details.

To get helpful answers, please include:

  • Your code: Show the numpy array operations you're attempting
  • What you're trying to do: Explain the specific slicing behavior you want
  • What's happening: Include any error messages or unexpected results
  • What you've tried: Show troubleshooting steps you've already taken

Once you add these details, the community will be able to help you much more effectively!

#

-# Python @celest crane @quaint raven @grizzled rock @forest helm

forest helm
#

letters[depth, row, col]

then you can just use normal slicing

#

so entire depth 1 would be letters[1, :, :]