@@ -5966,10 +5966,9 @@ NC_CHAR).
59665966 ierr = nc_put_vara(self ._grpid, self ._varid,
59675967 startp, countp, strdata)
59685968 else :
5969- raise IndexError (' strides must all be 1 for string variables' )
5970- # with nogil:
5971- # ierr = nc_put_vars(self._grpid, self._varid,
5972- # startp, countp, stridep, strdata)
5969+ with nogil:
5970+ ierr = nc_put_vars(self ._grpid, self ._varid,
5971+ startp, countp, stridep, strdata)
59735972 _ensure_nc_success(ierr)
59745973 free(strdata)
59755974 else :
@@ -5995,10 +5994,9 @@ NC_CHAR).
59955994 ierr = nc_put_vara(self ._grpid, self ._varid,
59965995 startp, countp, vldata)
59975996 else :
5998- raise IndexError (' strides must all be 1 for vlen variables' )
5999- # with nogil:
6000- # ierr = nc_put_vars(self._grpid, self._varid,
6001- # startp, countp, stridep, vldata)
5997+ with nogil:
5998+ ierr = nc_put_vars(self ._grpid, self ._varid,
5999+ startp, countp, stridep, vldata)
60026000 _ensure_nc_success(ierr)
60036001 # free the pointer array.
60046002 free(vldata)
@@ -6091,11 +6089,9 @@ NC_CHAR).
60916089 ierr = nc_get_vara(self ._grpid, self ._varid,
60926090 startp, countp, strdata)
60936091 else :
6094- # FIXME: is this a bug in netCDF4?
6095- raise IndexError (' strides must all be 1 for string variables' )
6096- # with nogil:
6097- # ierr = nc_get_vars(self._grpid, self._varid,
6098- # startp, countp, stridep, strdata)
6092+ with nogil:
6093+ ierr = nc_get_vars(self ._grpid, self ._varid,
6094+ startp, countp, stridep, strdata)
60996095 if ierr == NC_EINVALCOORDS:
61006096 raise IndexError
61016097 elif ierr != NC_NOERR:
@@ -6130,10 +6126,9 @@ NC_CHAR).
61306126 ierr = nc_get_vara(self ._grpid, self ._varid,
61316127 startp, countp, vldata)
61326128 else :
6133- raise IndexError (' strides must all be 1 for vlen variables' )
6134- # with nogil:
6135- # ierr = nc_get_vars(self._grpid, self._varid,
6136- # startp, countp, stridep, vldata)
6129+ with nogil:
6130+ ierr = nc_get_vars(self ._grpid, self ._varid,
6131+ startp, countp, stridep, vldata)
61376132 if ierr == NC_EINVALCOORDS:
61386133 raise IndexError
61396134 elif ierr != NC_NOERR:
0 commit comments