Skip to content

Commit 351e58e

Browse files
jswhit2jswhit2
authored andcommitted
update docstring
1 parent 701e119 commit 351e58e

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

docs/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1226,7 +1226,7 @@ <h2 id="support-for-complex-numbers">Support for complex numbers</h2>
12261226
<h2 class="section-title" id="header-functions">Functions</h2>
12271227
<dl>
12281228
<dt id="netCDF4.chartostring"><code class="name flex">
1229-
<span>def <span class="ident">chartostring</span></span>(<span>b, encoding='utf-8')</span>
1229+
<span>def <span class="ident">chartostring</span></span>(<span>b, encoding=None)</span>
12301230
</code></dt>
12311231
<dd>
12321232
<div class="desc"><p><strong><code>chartostring(b,encoding='utf-8')</code></strong></p>
@@ -1236,8 +1236,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
12361236
Will be converted to a array of strings, where each string has a fixed
12371237
length of <code>b.shape[-1]</code> characters.</p>
12381238
<p>optional kwarg <code>encoding</code> can be used to specify character encoding (default
1239-
<code>utf-8</code>). If <code>encoding</code> is 'none' or 'bytes', a <code>numpy.string_</code> byte array is
1240-
returned.</p>
1239+
<code>utf-8</code> for dtype=<code>'UN'</code> or <code>ascii</code> for dtype=<code>'SN'</code>). If <code>encoding</code> is 'none' or 'bytes',
1240+
a <code>numpy.string_</code> byte array is returned.</p>
12411241
<p>returns a numpy string array with datatype <code>'UN'</code> (or <code>'SN'</code>) and shape
12421242
<code>b.shape[:-1]</code> where where <code>N=b.shape[-1]</code>.</p></div>
12431243
</dd>
@@ -1254,7 +1254,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
12541254
<p><strong>calendar</strong>: describes the calendar to be used in the time calculations.
12551255
All the values currently defined in the
12561256
<code>CF metadata convention &lt;http://cfconventions.org/cf-conventions/cf-conventions#calendar&gt;</code>__ are supported.
1257-
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian'
1257+
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian', 'tai',
12581258
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'</strong>.
12591259
Default is <code>None</code> which means the calendar associated with the first
12601260
input datetime instance will be used.</p>
@@ -1305,7 +1305,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
13051305
<p><strong>calendar</strong>: describes the calendar to be used in the time calculations.
13061306
All the values currently defined in the
13071307
<code>CF metadata convention &lt;http://cfconventions.org/cf-conventions/cf-conventions#calendar&gt;</code>__ are supported.
1308-
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian'
1308+
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian', 'tai',
13091309
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'</strong>.
13101310
Default is <code>None</code> which means the calendar associated with the first
13111311
input datetime instance will be used.</p>
@@ -1381,7 +1381,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
13811381
<p><strong>calendar</strong>: describes the calendar used in the time calculations.
13821382
All the values currently defined in the
13831383
<code>CF metadata convention &lt;http://cfconventions.org/cf-conventions/cf-conventions#calendar&gt;</code>__ are supported.
1384-
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian'
1384+
Valid calendars <strong>'standard', 'gregorian', 'proleptic_gregorian', 'tai',
13851385
'noleap', '365_day', '360_day', 'julian', 'all_leap', '366_day'</strong>.
13861386
Default is <strong>'standard'</strong>, which is a mixed Julian/Gregorian calendar.</p>
13871387
<p><strong>only_use_cftime_datetimes</strong>: if False, python datetime.datetime
@@ -1476,7 +1476,7 @@ <h2 class="section-title" id="header-functions">Functions</h2>
14761476
(default) or <code>'U1'</code> (if dtype=<code>'U'</code>)</p></div>
14771477
</dd>
14781478
<dt id="netCDF4.stringtochar"><code class="name flex">
1479-
<span>def <span class="ident">stringtochar</span></span>(<span>a, encoding='utf-8', n_strlen=None)</span>
1479+
<span>def <span class="ident">stringtochar</span></span>(<span>a, encoding=None, n_strlen=None)</span>
14801480
</code></dt>
14811481
<dd>
14821482
<div class="desc"><p><strong><code>stringtochar(a,encoding='utf-8',n_strlen=None)</code></strong></p>
@@ -1487,8 +1487,8 @@ <h2 class="section-title" id="header-functions">Functions</h2>
14871487
Will be converted to
14881488
an array of characters (datatype <code>'S1'</code> or <code>'U1'</code>) of shape <code>a.shape + (N,)</code>.</p>
14891489
<p>optional kwarg <code>encoding</code> can be used to specify character encoding (default
1490-
<code>utf-8</code>). If <code>encoding</code> is 'none' or 'bytes', a <code>numpy.string_</code> the input array
1491-
is treated a raw byte strings (<code>numpy.string_</code>).</p>
1490+
<code>utf-8</code> for dtype=<code>'UN'</code> or <code>ascii</code> for dtype=<code>'SN'</code>). If <code>encoding</code> is 'none' or 'bytes',
1491+
a <code>numpy.string_</code> the input array is treated a raw byte strings (<code>numpy.string_</code>).</p>
14921492
<p>optional kwarg <code>n_strlen</code> is the number of characters in each string.
14931493
Default
14941494
is None, which means <code>n_strlen</code> will be set to a.itemsize (the number of bytes

src/netCDF4/_netCDF4.pyx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6842,10 +6842,6 @@ convert a character array to a string array with one less dimension.
68426842
Will be converted to a array of strings, where each string has a fixed
68436843
length of `b.shape[-1]` characters.
68446844
6845-
optional kwarg `encoding` can be used to specify character encoding (default
6846-
`utf-8`). If `encoding` is 'none' or 'bytes', a `numpy.string_` byte array is
6847-
returned.
6848-
68496845
optional kwarg `encoding` can be used to specify character encoding (default
68506846
`utf-8` for dtype=`'UN'` or `ascii` for dtype=`'SN'`). If `encoding` is 'none' or 'bytes',
68516847
a `numpy.string_` byte array is returned.

0 commit comments

Comments
 (0)