Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
5e933a2f
Commit
5e933a2f
authored
Oct 15, 2009
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
5190f6bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
Cython/Includes/numpy.pxd
Cython/Includes/numpy.pxd
+7
-9
No files found.
Cython/Includes/numpy.pxd
View file @
5e933a2f
...
...
@@ -17,7 +17,7 @@
DEF
_buffer_format_string_len
=
255
cimport
python_buffer
as
pybuf
from
python_ref
cimport
PyObject
,
Py_
X
INCREF
,
Py_XDECREF
from
python_ref
cimport
PyObject
,
Py_INCREF
,
Py_XDECREF
cimport
stdlib
cimport
stdio
...
...
@@ -903,23 +903,21 @@ cdef extern from "numpy/ufuncobject.h":
(
PyUFuncGenericFunction
*
,
void
**
,
char
*
,
int
,
int
,
int
,
int
,
char
*
,
char
*
,
int
,
char
*
)
void
import_ufunc
()
cdef
inline
void
set_array_base
(
ndarray
arr
,
object
base
):
cdef
PyObject
*
baseptr
cdef
ndarray
raw
=
arr
if
base
is
None
:
baseptr
=
NULL
else
:
Py_INCREF
(
base
)
# important to do this before decref below!
baseptr
=
<
PyObject
*>
base
Py_XINCREF
(
baseptr
)
# important to do this before decref below!
Py_XDECREF
(
raw
.
base
)
raw
.
base
=
baseptr
Py_XDECREF
(
arr
.
base
)
arr
.
base
=
baseptr
cdef
inline
object
get_array_base
(
ndarray
arr
):
cdef
ndarray
raw
=
arr
if
raw
.
base
==
NULL
:
if
arr
.
base
is
NULL
:
return
None
else
:
return
<
object
>
raw
.
base
return
<
object
>
arr
.
base
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment