Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
pybind11
Commits
9a777a26
Commit
9a777a26
authored
Aug 25, 2016
by
Wenzel Jakob
Browse files
numpy.h: fix test suite issues on the Intel Compiler
parent
89f2db45
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/pybind11/numpy.h
include/pybind11/numpy.h
+4
-4
No files found.
include/pybind11/numpy.h
View file @
9a777a26
...
...
@@ -133,7 +133,7 @@ public:
args
[
"names"
]
=
names
;
args
[
"formats"
]
=
formats
;
args
[
"offsets"
]
=
offsets
;
args
[
"itemsize"
]
=
int_
(
itemsize
);
args
[
"itemsize"
]
=
pybind11
::
int_
(
itemsize
);
m_ptr
=
from_args
(
args
).
release
().
ptr
();
}
...
...
@@ -150,7 +150,7 @@ public:
}
size_t
itemsize
()
const
{
return
(
size_t
)
attr
(
"itemsize"
).
cast
<
int_
>
();
return
attr
(
"itemsize"
).
cast
<
size_t
>
();
}
bool
has_fields
()
const
{
...
...
@@ -175,7 +175,7 @@ private:
if
(
fields
.
ptr
()
==
Py_None
)
return
*
this
;
struct
field_descr
{
PYBIND11_STR_TYPE
name
;
object
format
;
int_
offset
;
};
struct
field_descr
{
PYBIND11_STR_TYPE
name
;
object
format
;
pybind11
::
int_
offset
;
};
std
::
vector
<
field_descr
>
field_descriptors
;
auto
items
=
fields
.
attr
(
"items"
).
cast
<
object
>
();
...
...
@@ -183,7 +183,7 @@ private:
auto
spec
=
object
(
field
,
true
).
cast
<
tuple
>
();
auto
name
=
spec
[
0
].
cast
<
pybind11
::
str
>
();
auto
format
=
spec
[
1
].
cast
<
tuple
>
()[
0
].
cast
<
dtype
>
();
auto
offset
=
spec
[
1
].
cast
<
tuple
>
()[
1
].
cast
<
int_
>
();
auto
offset
=
spec
[
1
].
cast
<
tuple
>
()[
1
].
cast
<
pybind11
::
int_
>
();
if
(
!
len
(
name
)
&&
format
.
kind
()
==
"V"
)
continue
;
field_descriptors
.
push_back
({(
PYBIND11_STR_TYPE
)
name
,
format
.
strip_padding
(),
offset
});
...
...
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