2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 06:42:27 +00:00
This commit is contained in:
stefanseefeld
2024-07-01 19:30:19 +00:00
parent 467f2a5f66
commit 69603ea1ed
8 changed files with 6 additions and 6 deletions

View File

@@ -112,7 +112,7 @@ Here, we first convert the variable into a string, and then extract it as a C++
<span class="n">np</span><span class="o">::</span><span class="n">dtype</span> <span class="n">custom_dtype</span> <span class="o">=</span> <span class="n">np</span><span class="o">::</span><span class="n">dtype</span><span class="p">(</span><span class="n">list_for_dtype</span><span class="p">)</span> <span class="p">;</span>
</pre></div>
</div>
<p>We are now ready to create an ndarray with dimensions specified by *shape* and of custom dtpye</p>
<p>We are now ready to create an ndarray with dimensions specified by *shape* and of custom dtype</p>
<div class="highlight-c++ notranslate"><div class="highlight"><pre><span></span> <span class="n">np</span><span class="o">::</span><span class="n">ndarray</span> <span class="n">new_array</span> <span class="o">=</span> <span class="n">np</span><span class="o">::</span><span class="n">zeros</span><span class="p">(</span><span class="n">shape</span><span class="p">,</span><span class="n">custom_dtype</span><span class="p">);</span>
<span class="p">}</span>
</pre></div>