From f111d39684c8cda8155b024d122c18a8679d59bc Mon Sep 17 00:00:00 2001 From: Matthew A Johnson Date: Wed, 11 Feb 2026 12:53:15 +0000 Subject: [PATCH] v2.1.0 - Support for boolean tensors Signed-off-by: Matthew A Johnson --- .github/workflows/prgate.yaml | 56 ++++---------------------- CHANGELOG.md | 13 ++++++ VERSION | 2 +- examples/custom_tensors/CMakeLists.txt | 6 +++ examples/images/CMakeLists.txt | 5 +++ include/npy/npy.h | 4 +- 6 files changed, 35 insertions(+), 51 deletions(-) diff --git a/.github/workflows/prgate.yaml b/.github/workflows/prgate.yaml index 404c381..f45d28f 100644 --- a/.github/workflows/prgate.yaml +++ b/.github/workflows/prgate.yaml @@ -66,16 +66,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/images run: cmake -B ${{github.workspace}}/examples/images/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/images/build @@ -92,16 +87,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/custom_tensors run: cmake -B ${{github.workspace}}/examples/custom_tensors/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/custom_tensors/build @@ -181,16 +171,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/images run: cmake -B ${{github.workspace}}/examples/images/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/images/build @@ -207,16 +192,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/custom_tensors run: cmake -B ${{github.workspace}}/examples/custom_tensors/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/custom_tensors/build @@ -266,16 +246,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/images run: cmake -B ${{github.workspace}}/examples/images/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/images/build @@ -292,16 +267,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/custom_tensors run: cmake -B ${{github.workspace}}/examples/custom_tensors/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/custom_tensors/build @@ -351,16 +321,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/images run: cmake -B ${{github.workspace}}/examples/images/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/images/build @@ -377,16 +342,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Git config for fetching pull requests - run: | - git config --global --add remote.origin.fetch +refs/pull/*/merge:refs/remotes/pull/* - - name: CMake config working-directory: ${{github.workspace}}/examples/custom_tensors run: cmake -B ${{github.workspace}}/examples/custom_tensors/build env: - LIBNPY_REPO: https://github.com/${{github.repository}} - LIBNPY_TAG: ${{github.sha}} + LIBNPY_REPO: LOCAL - name: CMake build working-directory: ${{github.workspace}}/examples/custom_tensors/build diff --git a/CHANGELOG.md b/CHANGELOG.md index da5907e..33817af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [2026-02-11 - Version 2.1.0](https://github.com/matajoh/libnpy/releases/tag/v2.1.0) + +Minor version adding support for boolean tensors. + +Improvements +- New `boolean` type which acts like a `bool` but is stored in vectors as a byte + (instead of a bitmask, see https://cppreference.net/cpp/container/vector_bool.html) +- Support for numpy boolean tensors (using the above `boolean` type) +- Updating the CI to deal with intermittent failures on Github + +Thanks!! +- https://github.com/olokobayusuf for this feature suggestion and the PR + ## [2026-01-14 - Version 2.0.0](https://github.com/matajoh/libnpy/releases/tag/v2.0.0) Major version with breaking changes. diff --git a/VERSION b/VERSION index 359a5b9..50aea0e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.0.0 \ No newline at end of file +2.1.0 \ No newline at end of file diff --git a/examples/custom_tensors/CMakeLists.txt b/examples/custom_tensors/CMakeLists.txt index 8c49c1e..af372ec 100644 --- a/examples/custom_tensors/CMakeLists.txt +++ b/examples/custom_tensors/CMakeLists.txt @@ -19,6 +19,12 @@ else () set(LIBNPY_TAG "main") endif() +if(LIBNPY_REPO STREQUAL LOCAL) + set(FETCHCONTENT_SOURCE_DIR_LIBNPY "${CMAKE_SOURCE_DIR}/../..") + message("LIBNPY_REPO=LOCAL: Using ${FETCHCONTENT_SOURCE_DIR_LIBNPY} as source directory") +endif() + + FetchContent_Declare( libnpy GIT_REPOSITORY ${LIBNPY_REPO} diff --git a/examples/images/CMakeLists.txt b/examples/images/CMakeLists.txt index be133cb..4ca7588 100644 --- a/examples/images/CMakeLists.txt +++ b/examples/images/CMakeLists.txt @@ -19,6 +19,11 @@ else () set(LIBNPY_TAG "main") endif() +if(LIBNPY_REPO STREQUAL LOCAL) + set(FETCHCONTENT_SOURCE_DIR_LIBNPY "${CMAKE_SOURCE_DIR}/../..") + message("LIBNPY_REPO=LOCAL: Using ${FETCHCONTENT_SOURCE_DIR_LIBNPY} as source directory") +endif() + FetchContent_Declare( libnpy GIT_REPOSITORY ${LIBNPY_REPO} diff --git a/include/npy/npy.h b/include/npy/npy.h index dde3c10..1ca72b4 100644 --- a/include/npy/npy.h +++ b/include/npy/npy.h @@ -30,9 +30,9 @@ #include #define NPY_VERSION_MAJOR 2 -#define NPY_VERSION_MINOR 0 +#define NPY_VERSION_MINOR 1 #define NPY_VERSION_PATCH 0 -#define NPY_VERSION_STRING "2.0.0" +#define NPY_VERSION_STRING "2.1.0" const int STATIC_HEADER_LENGTH = 10;