All([d == N for d in vol.shape])

Welcome to the forum @himanshumehra11 .
Please can you post additional information:

  1. Error message as text
  2. the CryoSPARC version
  3. how the input volume was prepared. Was the volume created or modified using external software, then imported to CryoSPARC?