Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Commit

Permalink
Update submodule and propagate ndim dtype to int8_t
Browse files Browse the repository at this point in the history
  • Loading branch information
martaiborra committed Apr 8, 2022
1 parent ab50488 commit 11588a7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion caterva/caterva
12 changes: 6 additions & 6 deletions caterva/caterva_ext.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ cdef extern from "blosc2.h":

int blosc2_meta_exists(blosc2_schunk *schunk, const char *name)
int blosc2_meta_add(blosc2_schunk *schunk, const char *name, uint8_t *content,
uint32_t content_len)
int32_t content_len)
int blosc2_meta_update(blosc2_schunk *schunk, const char *name, uint8_t *content,
uint32_t content_len)
int32_t content_len)
int blosc2_meta_get(blosc2_schunk *schunk, const char *name, uint8_t ** content,
uint32_t *content_len)
int32_t *content_len)



Expand Down Expand Up @@ -136,13 +136,13 @@ cdef extern from "caterva.h":

ctypedef struct caterva_params_t:
int64_t shape[CATERVA_MAX_DIM]
uint8_t ndim
int8_t ndim
uint8_t itemsize


cdef struct chunk_cache_s:
uint8_t *data
int32_t nchunk
int64_t nchunk

ctypedef struct caterva_array_t:
blosc2_schunk *sc;
Expand Down Expand Up @@ -580,7 +580,7 @@ def meta__getitem__(self, name):
cdef caterva_array_t *array = <caterva_array_t *><uintptr_t> self.c_array
name = name.encode("utf-8") if isinstance(name, str) else name
cdef uint8_t *content
cdef uint32_t content_len
cdef int32_t content_len
n = blosc2_meta_get(array.sc, name, &content, &content_len)
return PyBytes_FromStringAndSize(<char *> content, content_len)

Expand Down

0 comments on commit 11588a7

Please sign in to comment.