10000 MAINT: Delete some unused functions · numpy/numpy@772ac76 · GitHub
[go: up one dir, main page]

Skip to content

Commit 772ac76

Browse files
sebergcharris
authored andcommitted
MAINT: Delete some unused functions
1 parent 597fc07 commit 772ac76

File tree

2 files changed

+0
-51
lines changed

2 files changed

+0
-51
lines changed

numpy/core/src/multiarray/convert.c

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -543,35 +543,6 @@ PyArray_AssignZero(PyArrayObject *dst,
543543
return retcode;
544544
}
545545

546-
/*
547-
* Fills an array with ones.
548-
*
549-
* dst: The destination array.
550-
* wheremask: If non-NULL, a boolean mask specifying where to set the values.
551-
*
552-
* Returns 0 on success, -1 on failure.
553-
*/
554-
NPY_NO_EXPORT int
555-
PyArray_AssignOne(PyArrayObject *dst,
556-
PyArrayObject *wheremask)
557-
{
558-
npy_bool value;
559-
PyArray_Descr *bool_dtype;
560-
int retcode;
561-
562-
/* Create a raw bool scalar with the value True */
563-
bool_dtype = PyArray_DescrFromType(NPY_BOOL);
564-
if (bool_dtype == NULL) {
565-
return -1;
566-
}
567-
value = 1;
568-
569-
retcode = PyArray_AssignRawScalar(dst, bool_dtype, (char *)&value,
570-
wheremask, NPY_SAFE_CASTING);
571-
572-
Py_DECREF(bool_dtype);
573-
return retcode;
574-
}
575546

576547
/*NUMPY_API
577548
* Copy an array.

numpy/core/src/multiarray/ctors.c

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1401,28 +1401,6 @@ _dtype_from_buffer_3118(PyObject *memoryview)
14011401
}
14021402

14031403

1404-
/*
1405-
* Call the python _is_from_ctypes
1406-
*/
1407-
NPY_NO_EXPORT int
1408-
_is_from_ctypes(PyObject *obj) {
1409-
PyObject *ret_obj;
1410-
static PyObject *py_func = NULL;
1411-
1412-
npy_cache_import("numpy.core._internal", "_is_from_ctypes", &py_func);
1413-
1414-
if (py_func == NULL) {
1415-
return -1;
1416-
}
1417-
ret_obj = PyObject_CallFunctionObjArgs(py_func, obj, NULL);
1418-
if (ret_obj == NULL) {
1419-
return -1;
1420-
}
1421-
1422-
return PyObject_IsTrue(ret_obj);
1423-
}
1424-
1425-
14261404
NPY_NO_EXPORT PyObject *
14271405
_array_from_buffer_3118(PyObject *memoryview)
14281406
{

0 commit comments

Comments
 (0)
0