Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 8 additions & 48 deletions .github/workflows/prgate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.0
2.1.0
6 changes: 6 additions & 0 deletions examples/custom_tensors/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
5 changes: 5 additions & 0 deletions examples/images/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
4 changes: 2 additions & 2 deletions include/npy/npy.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#include <vector>

#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;

Expand Down
Loading