aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pyside_numpy.h
blob: 0925a6bd6d2ff89eaf1c9b02ce5d17910045cebc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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