Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
kwant
tinyarray
Commits
5743ed94
Commit
5743ed94
authored
Aug 28, 2020
by
Christoph Groth
Browse files
tiny optimization
parent
f6d8a20e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/array.cc
View file @
5743ed94
...
...
@@ -365,9 +365,9 @@ PyObject *(*readin_scalar_into_new_dtable[])(PyObject*, bool, int) =
int
examine_buffer
(
PyObject
*
in
,
Py_buffer
*
view
,
Dtype
*
dtype
)
{
if
(
!
PyObject_CheckBuffer
(
in
))
return
-
1
;
Dtype
dt
=
NONE
;
memset
(
view
,
0
,
sizeof
(
Py_buffer
));
if
(
!
PyObject_CheckBuffer
(
in
))
return
-
1
;
// I don't know if the following makes much sense: I try to get the buffer
// using less and less demanding flags. NumPy does the same.
...
...
Write
Preview
Supports
Markdown
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