Skip to content

Commit 4045a60

Browse files
committed
MAINT: add missing noexcept clauses (2/2)
This commit fixes the remaining instances. See description in previous commit.
1 parent 9b27220 commit 4045a60

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

numpy/__init__.cython-30.pxd

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,11 @@ cdef extern from "numpy/arrayobject.h":
283283
cdef int type_num
284284

285285
@property
286-
cdef inline npy_intp itemsize(self) nogil:
286+
cdef inline npy_intp itemsize(self) noexcept nogil:
287287
return PyDataType_ELSIZE(self)
288288

289289
@property
290-
cdef inline npy_intp alignment(self) nogil:
290+
cdef inline npy_intp alignment(self) noexcept nogil:
291291
return PyDataType_ALIGNMENT(self)
292292

293293
# Use fields/names with care as they may be NULL. You must check
@@ -304,11 +304,11 @@ cdef extern from "numpy/arrayobject.h":
304304
# valid (the pointer can be NULL). Most users should access
305305
# this field via the inline helper method PyDataType_SHAPE.
306306
@property
307-
cdef inline PyArray_ArrayDescr* subarray(self) nogil:
307+
cdef inline PyArray_ArrayDescr* subarray(self) noexcept nogil:
308308
return PyDataType_SUBARRAY(self)
309309

310310
@property
311-
cdef inline npy_uint64 flags(self) nogil:
311+
cdef inline npy_uint64 flags(self) noexcept nogil:
312312
"""The data types flags."""
313313
return PyDataType_FLAGS(self)
314314

@@ -320,32 +320,32 @@ cdef extern from "numpy/arrayobject.h":
320320
ctypedef class numpy.broadcast [object PyArrayMultiIterObject, check_size ignore]:
321321

322322
@property
323-
cdef inline int numiter(self) nogil:
323+
cdef inline int numiter(self) noexcept nogil:
324324
"""The number of arrays that need to be broadcast to the same shape."""
325325
return PyArray_MultiIter_NUMITER(self)
326326

327327
@property
328-
cdef inline npy_intp size(self) nogil:
328+
cdef inline npy_intp size(self) noexcept nogil:
329329
"""The total broadcasted size."""
330330
return PyArray_MultiIter_SIZE(self)
331331

332332
@property
333-
cdef inline npy_intp index(self) nogil:
333+
cdef inline npy_intp index(self) noexcept nogil:
334334
"""The current (1-d) index into the broadcasted result."""
335335
return PyArray_MultiIter_INDEX(self)
336336

337337
@property
338-
cdef inline int nd(self) nogil:
338+
cdef inline int nd(self) noexcept nogil:
339339
"""The number of dimensions in the broadcasted result."""
340340
return PyArray_MultiIter_NDIM(self)
341341

342342
@property
343-
cdef inline npy_intp* dimensions(self) nogil:
343+
cdef inline npy_intp* dimensions(self) noexcept nogil:
344344
"""The shape of the broadcasted result."""
345345
return PyArray_MultiIter_DIMS(self)
346346

347347
@property
348-
cdef inline void** iters(self) nogil:
348+
cdef inline void** iters(self) noexcept nogil:
349349
"""An array of iterator objects that holds the iterators for the arrays to be broadcast together.
350350
On return, the iterators are adjusted for broadcasting."""
351351
return PyArray_MultiIter_ITERS(self)

0 commit comments

Comments
 (0)