aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pyside_numpy.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/pyside_numpy.h')
-rw-r--r--sources/pyside6/libpyside/pyside_numpy.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/sources/pyside6/libpyside/pyside_numpy.h b/sources/pyside6/libpyside/pyside_numpy.h
new file mode 100644
index 000000000..0925a6bd6
--- /dev/null
+++ b/sources/pyside6/libpyside/pyside_numpy.h
@@ -0,0 +1,37 @@
+// Copyright (C) 2021 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#ifndef PYSIDE_NUMPY_H
+#define PYSIDE_NUMPY_H
+
+#include <sbkpython.h>
+#include <sbknumpycheck.h>
+
+#include <pysidemacros.h>
+
+#include <QtCore/QList>
+#include <QtCore/QPoint>
+#include <QtCore/QPointF>
+
+namespace PySide::Numpy
+{
+
+/// Create a list of QPointF from 2 equally sized numpy array of x and y data
+/// (float,double).
+/// \param pyXIn X data array
+/// \param pyYIn Y data array
+/// \return List of QPointF
+
+PYSIDE_API QList<QPointF> xyDataToQPointFList(PyObject *pyXIn, PyObject *pyYIn);
+
+/// Create a list of QPoint from 2 equally sized numpy array of x and y data
+/// (int).
+/// \param pyXIn X data array
+/// \param pyYIn Y data array
+/// \return List of QPoint
+
+PYSIDE_API QList<QPoint> xyDataToQPointList(PyObject *pyXIn, PyObject *pyYIn);
+
+} //namespace PySide::Numpy
+
+#endif // PYSIDE_NUMPY_H