diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp b/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp
index 822c48fcb1e19964d063aa28c9fa4b6002a36817..735e9610c95667305f3f04eedff0d4dd391a1f0d 100644
--- a/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp
+++ b/ProcessLib/SourceTerms/Python/PythonSourceTermModule.cpp
@@ -29,11 +29,11 @@ public:
     using PythonSourceTermPythonSideInterface::
         PythonSourceTermPythonSideInterface;
 
-    std::pair<double, std::array<double, 3>> getFlux(
-        double t, std::array<double, 3> x,
+    std::pair<double, std::vector<double>> getFlux(
+        double t, std::array<double, 3> const& x,
         std::vector<double> const& primary_variables) const override
     {
-        using Ret = std::pair<double, std::array<double, 3>>;
+        using Ret = std::pair<double, std::vector<double>>;
         PYBIND11_OVERLOAD(Ret, PythonSourceTermPythonSideInterface,
                           getFlux, t, x, primary_variables);
     }
diff --git a/ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h b/ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h
index 754dedfe8439df73419b4dac9ada526794e90447..e8ba176afc60e40833c5bc7ef4246743ae4b0b1f 100644
--- a/ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h
+++ b/ProcessLib/SourceTerms/Python/PythonSourceTermPythonSideInterface.h
@@ -28,11 +28,14 @@ public:
      * \return flux Flux of the source term at that node and derivative of the
      * flux w.r.t. all primary variables.
      */
-    virtual std::pair<double, std::array<double, 3>> getFlux(
-        double /*t*/, std::array<double, 3> /*x*/,
+    virtual std::pair<double, std::vector<double>> getFlux(
+        double /*t*/, std::array<double, 3> const& /*x*/,
         std::vector<double> const& /*primary_variables*/) const
     {
-        return {std::numeric_limits<double>::quiet_NaN(), {}};
+        return {std::numeric_limits<double>::quiet_NaN(),
+                std::vector<double>{std::numeric_limits<double>::quiet_NaN(),
+                                    std::numeric_limits<double>::quiet_NaN(),
+                                    std::numeric_limits<double>::quiet_NaN()}};
     }
 
     //! Tells if getFlux() has been overridden in the derived class in Python.