The docstring suggests that either 4D or 3D arrays are acceptable inputs. Which is it?