Skip to content

Commit 3559232

Browse files
committed
fixing NPY_SAME_CAST
1 parent 8ff6e0c commit 3559232

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

quaddtype2/quaddtype/src/casts.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ static NPY_CASTING quad_to_quad_resolve_descriptors(PyObject *NPY_UNUSED(self),
3838
}
3939

4040
*view_offset = 0;
41-
return NPY_EQUIV_CASTING;
41+
return NPY_SAME_KIND_CASTING;
4242
}
4343

4444
static int quad_to_quad_strided_loop(

quaddtype2/quaddtype/src/dtype.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ PyArray_DTypeMeta QuadPrecDType = {
184184
int init_quadprec_dtype(void)
185185
{
186186
PyArrayMethod_Spec **casts = init_casts();
187+
if (!casts)
188+
return -1;
187189

188190
PyArrayDTypeMeta_Spec QuadPrecDType_DTypeSpec = {
189191
.flags = NPY_DT_NUMERIC,

0 commit comments

Comments
 (0)