This commit is contained in:
Christian Zimmermann 2023-05-07 21:28:30 +02:00
parent b32b01d272
commit 33f7b0322d
4 changed files with 20 additions and 5140 deletions

8
cnorxz/base/array.pxd Normal file
View file

@ -0,0 +1,8 @@
from libcpp.memory cimport shared_ptr
from range cimport cpp_RangeBase
cdef extern from "array/array_base.h" namespace "CNORXZ":
cdef cppclass cpp_CArrayBase "CNORXZ::CArrayBase"[T]:
size_t size() except+

11
cnorxz/base/array.pyx Normal file
View file

@ -0,0 +1,11 @@
from libcpp.memory cimport shared_ptr, make_shared, dynamic_pointer_cast
from array cimport cpp_CArrayBase
cdef class Array:
cdef shared_ptr[cpp_CArrayBase[double]] cpp_array
def size(self):
return self.cpp_array.get().size()

View file

@ -5,3 +5,4 @@ cdef extern from "ranges/ranges.h" namespace "CNORXZ":
cdef cppclass cpp_RangeBase "CNORXZ::RangeBase": cdef cppclass cpp_RangeBase "CNORXZ::RangeBase":
size_t size() except + size_t size() except +
size_t dim() except + size_t dim() except +

File diff suppressed because it is too large Load diff