Skip to content

Commit 81b8dcc

Browse files
committed
fix bug: Variable.put_var has no parameter of num
1 parent e5f3fdf commit 81b8dcc

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

src/pnetcdf/_Variable.pyx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1305,25 +1305,23 @@ cdef class Variable:
13051305
var[start[0]:end[0], start[1]:end[1]] = buf
13061306
13071307
"""
1308-
if data is not None and all(arg is None for arg in [start, count, stride, num, imap]):
1308+
if data is not None and all(arg is None for arg in [start, count, stride, imap]):
13091309
self._put_var(data, collective = True, bufcount = bufcount, buftype = buftype)
1310-
elif all(arg is not None for arg in [data, start]) and all(arg is None for arg in [count, stride, num, imap]):
1310+
elif all(arg is not None for arg in [data, start]) and all(arg is None for arg in [count, stride, imap]):
13111311
self._put_var1(data, start, collective = True, bufcount = bufcount, buftype = buftype)
1312-
elif all(arg is not None for arg in [data, start, count]) and all(arg is None for arg in [stride, num, imap]):
1312+
elif all(arg is not None for arg in [data, start, count]) and all(arg is None for arg in [stride, imap]):
13131313
self._put_vara(start, count, data, collective = True, bufcount = bufcount, buftype = buftype)
1314-
elif all(arg is not None for arg in [data, start, count, stride]) and all(arg is None for arg in [num, imap]):
1314+
elif all(arg is not None for arg in [data, start, count, stride]) and all(arg is None for arg in [imap]):
13151315
self._put_vars(start, count, stride, data, collective = True, bufcount = bufcount, buftype = buftype)
1316-
elif all(arg is not None for arg in [data, start, count, num]) and all(arg is None for arg in [stride, imap]):
1317-
self._put_varn(start, count, num, data, collective = True, bufcount = bufcount, buftype = buftype)
1318-
elif all(arg is not None for arg in [data, start, count, imap]) and all(arg is None for arg in [num]):
1316+
elif all(arg is not None for arg in [data, start, count, imap]):
13191317
self._put_varm(data, start, count, stride, imap, collective = True, bufcount = bufcount, buftype = buftype)
13201318
else:
13211319
raise ValueError("Invalid input arguments for put_var_all")
13221320

13231321

1324-
def put_var(self, data, start=None, count=None, stride=None, num=None, imap=None, bufcount=None, buftype=None):
1322+
def put_var(self, data, start=None, count=None, stride=None, imap=None, bufcount=None, buftype=None):
13251323
"""
1326-
put_var(self, data, start=None, count=None, stride=None, num=None, imap=None, bufcount=None, buftype=None)
1324+
put_var(self, data, start=None, count=None, stride=None, imap=None, bufcount=None, buftype=None)
13271325
13281326
Method to write in parallel to the netCDF variable in the independent
13291327
I/O mode. For the argument usage, please refer to method

0 commit comments

Comments
 (0)