8000 Fixed implicit conversion from long to double by eduardobehr · Pull Request #333 · lava/matplotlib-cpp · GitHub
[go: up one dir, main page]

Skip to content
8000

Fixed implicit conversion from long to double #333

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fixed implicit conversion from long to double
  • Loading branch information
eduardobehr committed Dec 27, 2022
commit aa2e1d4922784a04835a2927fb42c3dc49c8fc8c
6 changes: 3 additions & 3 deletions matplotlibcpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -2255,9 +2255,9 @@ inline void subplot(long nrows, long ncols, long plot_number)

// construct positional args
PyObject* args = PyTuple_New(3);
PyTuple_SetItem(args, 0, PyFloat_FromDouble(nrows));
PyTuple_SetItem(args, 1, PyFloat_FromDouble(ncols));
PyTuple_SetItem(args, 2, PyFloat_FromDouble(plot_number));
PyTuple_SetItem(args, 0, PyLong_FromLong(nrows));
PyTuple_SetItem(args, 1, PyLong_FromLong(ncols));
PyTuple_SetItem(args, 2, PyLong_FromLong(plot_number));

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