Skip to content

Commit

Permalink
Remove debug assertion in Matrix._allocate
Browse files Browse the repository at this point in the history
  • Loading branch information
althonos committed Feb 15, 2024
1 parent 775ded3 commit 149785c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions pyhmmer/easel.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2461,12 +2461,9 @@ cdef class Matrix:
# --- Utility ------------------------------------------------------------

cdef int _allocate(self, size_t m, size_t n) except -1:
assert self._data == NULL

# NB(@althonos): malloc and calloc are not guaranteed to return a
# pointer when called with a null allocation size,
# so we allocate a single item instead

cdef int i
cdef int m_alloc = 1 if m == 0 else m
cdef int mn_alloc = 1 if m == 0 or n == 0 else m * n
Expand Down

0 comments on commit 149785c

Please sign in to comment.