From d06ac6ce1d53efb6660035a9b7434ea23e3e2989 Mon Sep 17 00:00:00 2001
From: thorstenhater <24411438+thorstenhater@users.noreply.github.com>
Date: Wed, 9 Dec 2020 15:56:52 +0100
Subject: [PATCH] Fix pybind11 issues. (#1248)

* Fix pybind11 issues.

* Retract suspicious fix.

* Address comments.
---
 python/schedule.hpp   | 1 +
 python/simulation.cpp | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/python/schedule.hpp b/python/schedule.hpp
index 32e6bcef..7762d2f9 100644
--- a/python/schedule.hpp
+++ b/python/schedule.hpp
@@ -18,6 +18,7 @@ struct schedule_shim_base {
     schedule_shim_base() = default;
     schedule_shim_base(const schedule_shim_base&) = delete;
     schedule_shim_base& operator=(schedule_shim_base&) = delete;
+    virtual ~schedule_shim_base() {}
 
     virtual arb::schedule schedule() const = 0;
 };
diff --git a/python/simulation.cpp b/python/simulation.cpp
index 1a95a9f1..ab29cd6c 100644
--- a/python/simulation.cpp
+++ b/python/simulation.cpp
@@ -107,7 +107,7 @@ public:
     }
 
     py::object spikes() const {
-        return py::array_t<arb::spike>({spike_record_.size()}, spike_record_.data());
+        return py::array_t<arb::spike>(py::ssize_t(spike_record_.size()), spike_record_.data());
     }
 
     py::list get_probe_metadata(arb::cell_member_type probe_id) const {
-- 
GitLab