diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d43072..0815b17 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.18...3.22) -project(cholespy LANGUAGES CXX C VERSION "0.1.6") +project(cholespy LANGUAGES CXX C VERSION "1.0.0") # Nanobind setup from https://github.com/wjakob/nanobind_example/blob/master/CMakeLists.txt if (NOT SKBUILD) diff --git a/dist/cholespy-0.1.6-cp310-cp310-linux_x86_64.whl b/dist/cholespy-0.1.6-cp310-cp310-linux_x86_64.whl new file mode 100644 index 0000000..3a9b015 Binary files /dev/null and b/dist/cholespy-0.1.6-cp310-cp310-linux_x86_64.whl differ diff --git a/dist/cholespy-0.2.0-cp310-cp310-linux_x86_64.whl b/dist/cholespy-0.2.0-cp310-cp310-linux_x86_64.whl new file mode 100644 index 0000000..4c84adf Binary files /dev/null and b/dist/cholespy-0.2.0-cp310-cp310-linux_x86_64.whl differ diff --git a/pyproject.toml b/pyproject.toml index 0f9db89..2d966ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ requires = [ "wheel", "scikit-build==0.14.0", "cmake>=3.18", - "nanobind>=0.0.7", + "nanobind>=1.0.0", "ninja; platform_system!='Windows'" ] diff --git a/setup.py b/setup.py index c04c332..d230c7a 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ setup( name="cholespy", - version="0.1.6", + version="1.0.0", description="A self-contained sparse Cholesky solver, compatible with CPU and GPU tensor frameworks.", author="Baptiste Nicolet", license="BSD", diff --git a/src/main.cpp b/src/main.cpp index c313aca..8fd137c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include "cholesky_solver.h" #include "docstr.h" #include -#include +#include #define STRINGIFY(x) #x #define MACRO_STRINGIFY(x) STRINGIFY(x) @@ -20,9 +20,9 @@ void declare_cholesky(nb::module_ &m, const std::string &typestr, const char *do nb::class_(m, class_name.c_str(), docstr) .def("__init__", [](Class *self, uint32_t n_rows, - nb::tensor, nb::c_contig> ii, - nb::tensor, nb::c_contig> jj, - nb::tensor, nb::c_contig> x, + nb::ndarray, nb::c_contig> ii, + nb::ndarray, nb::c_contig> jj, + nb::ndarray, nb::c_contig> x, MatrixType type) { if (type == MatrixType::COO){ @@ -78,8 +78,8 @@ void declare_cholesky(nb::module_ &m, const std::string &typestr, const char *do nb::arg("type"), doc_constructor) .def("solve", [](Class &self, - nb::tensor b, - nb::tensor x){ + nb::ndarray b, + nb::ndarray x){ if (b.ndim() != 1 && b.ndim() != 2) throw std::invalid_argument("Expected 1D or 2D tensors as input."); if (b.shape(0) != x.shape(0) || (b.ndim() == 2 && b.shape(1) != x.shape(1)))