File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -904,13 +904,9 @@ def __init__(
904904 self .channel_dim = float ("nan" ) if channel_dim == "no_channel" else channel_dim
905905 self .as_closest_canonical = as_closest_canonical
906906 self .squeeze_non_spatial_dims = squeeze_non_spatial_dims
907- if to_gpu is True :
908- if not has_cp :
909- warnings .warn ("CuPy is not installed, fall back to use cpu load." )
910- to_gpu = False
911- if not has_kvikio :
912- warnings .warn ("Kvikio is not installed, fall back to use cpu load." )
913- to_gpu = False
907+ if to_gpu and (not has_cp or not has_kvikio ):
908+ warnings .warn ("NibabelReader: CuPy and/or Kvikio not installed for GPU loading, falling back to CPU loading." )
909+ to_gpu = False
914910
915911 self .to_gpu = to_gpu
916912 self .kwargs = kwargs
You can’t perform that action at this time.
0 commit comments