8000 add comment on why _interpreter::get() has to be called · Cryoris/matplotlib-cpp@0e32084 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0e32084

Browse files
committed
add comment on why _interpreter::get() has to be called
1 parent f1f39a5 commit 0e32084

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

matplotlibcpp.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ PyObject *get_2darray(const std::vector<::std::vector<Numeric>> &v) {
381381
#else // fallback if we don't have numpy: copy every element of the given vector
382382

383383
template <typename Numeric> PyObject *get_array(const std::vector<Numeric> &v) {
384+
// interpreter needs to be initialized for any following commands to work
384385
detail::_interpreter::get();
385386

386387
PyObject *list = PyList_New(v.size());

0 commit comments

Comments
 (0)
0