pyside_numpy.h 957 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
  3. #ifndef PYSIDE_NUMPY_H
  4. #define PYSIDE_NUMPY_H
  5. #include <sbkpython.h>
  6. #include <sbknumpycheck.h>
  7. #include <pysidemacros.h>
  8. #include <QtCore/qlist.h>
  9. #include <QtCore/qpoint.h>
  10. #include <QtCore/qpoint.h>
  11. namespace PySide::Numpy
  12. {
  13. /// Create a list of QPointF from 2 equally sized numpy array of x and y data
  14. /// (float,double).
  15. /// \param pyXIn X data array
  16. /// \param pyYIn Y data array
  17. /// \return List of QPointF
  18. PYSIDE_API QList<QPointF> xyDataToQPointFList(PyObject *pyXIn, PyObject *pyYIn);
  19. /// Create a list of QPoint from 2 equally sized numpy array of x and y data
  20. /// (int).
  21. /// \param pyXIn X data array
  22. /// \param pyYIn Y data array
  23. /// \return List of QPoint
  24. PYSIDE_API QList<QPoint> xyDataToQPointList(PyObject *pyXIn, PyObject *pyYIn);
  25. } //namespace PySide::Numpy
  26. #endif // PYSIDE_NUMPY_H