Skip to content

Commit

Permalink
MAINT: Delete some unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
seberg committed Sep 11, 2019
1 parent ddffa68 commit 88a370a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 51 deletions.
29 changes: 0 additions & 29 deletions numpy/core/src/multiarray/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,35 +543,6 @@ PyArray_AssignZero(PyArrayObject *dst,
return retcode;
}

/*
* Fills an array with ones.
*
* dst: The destination array.
* wheremask: If non-NULL, a boolean mask specifying where to set the values.
*
* Returns 0 on success, -1 on failure.
*/
NPY_NO_EXPORT int
PyArray_AssignOne(PyArrayObject *dst,
PyArrayObject *wheremask)
{
npy_bool value;
PyArray_Descr *bool_dtype;
int retcode;

/* Create a raw bool scalar with the value True */
bool_dtype = PyArray_DescrFromType(NPY_BOOL);
if (bool_dtype == NULL) {
return -1;
}
value = 1;

retcode = PyArray_AssignRawScalar(dst, bool_dtype, (char *)&value,
wheremask, NPY_SAFE_CASTING);

Py_DECREF(bool_dtype);
return retcode;
}

/*NUMPY_API
* Copy an array.
Expand Down
22 changes: 0 additions & 22 deletions numpy/core/src/multiarray/ctors.c
Original file line number Diff line number Diff line change
Expand Up @@ -1426,28 +1426,6 @@ _dtype_from_buffer_3118(PyObject *memoryview)
}


/*
* Call the python _is_from_ctypes
*/
NPY_NO_EXPORT int
_is_from_ctypes(PyObject *obj) {
PyObject *ret_obj;
static PyObject *py_func = NULL;

npy_cache_import("numpy.core._internal", "_is_from_ctypes", &py_func);

if (py_func == NULL) {
return -1;
}
ret_obj = PyObject_CallFunctionObjArgs(py_func, obj, NULL);
if (ret_obj == NULL) {
return -1;
}

return PyObject_IsTrue(ret_obj);
}


NPY_NO_EXPORT PyObject *
_array_from_buffer_3118(PyObject *memoryview)
{
Expand Down

0 comments on commit 88a370a

Please sign in to comment.