Skip to content

Commit 9631044

Browse files
My edit to use the correct datatype.
1 parent ef0383f commit 9631044

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

matplotlibcpp.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2255,9 +2255,9 @@ inline void subplot(long nrows, long ncols, long plot_number)
22552255

22562256
// construct positional args
22572257
PyObject* args = PyTuple_New(3);
2258-
PyTuple_SetItem(args, 0, PyFloat_FromDouble(nrows));
2259-
PyTuple_SetItem(args, 1, PyFloat_FromDouble(ncols));
2260-
PyTuple_SetItem(args, 2, PyFloat_FromDouble(plot_number));
2258+
PyTuple_SetItem(args, 0, PyLong_FromDouble(nrows));
2259+
PyTuple_SetItem(args, 1, PyLong_FromDouble(ncols));
2260+
PyTuple_SetItem(args, 2, PyLong_FromDouble(plot_number));
22612261

22622262
PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_subplot, args);
22632263
if(!res) throw std::runtime_error("Call to subplot() failed.");

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy