From 17d9b1672dd3bac0e20c5cacce81f2be406c9862 Mon Sep 17 00:00:00 2001 From: Howard Butler Date: Mon, 16 Sep 2024 19:51:51 -0500 Subject: [PATCH] pin to numpy < 2.1 --- .github/environment.yml | 2 +- .github/workflows/build.yml | 2 +- src/pdal/io/NumpyReader.cpp | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/environment.yml b/.github/environment.yml index 26096eb..25365f5 100644 --- a/.github/environment.yml +++ b/.github/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - scikit-build-core - - numpy + - numpy < 2.1 - pdal - compilers - python diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dad35b4..344a442 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,7 +24,7 @@ jobs: fail-fast: true matrix: os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - name: Check out diff --git a/src/pdal/io/NumpyReader.cpp b/src/pdal/io/NumpyReader.cpp index 199faaa..5a34b98 100644 --- a/src/pdal/io/NumpyReader.cpp +++ b/src/pdal/io/NumpyReader.cpp @@ -142,6 +142,8 @@ PyArrayObject* load_npy_file(std::string const& filename) { PyObject *py_filename = PyUnicode_FromString(filename.c_str()); + if (!py_filename) + throw pdal::pdal_error(plang::getTraceback()); PyObject *numpy_module = PyImport_ImportModule("numpy"); if (!numpy_module) throw pdal::pdal_error(plang::getTraceback());