Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pybind11
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
pybind11
Commits
67b3daee
Commit
67b3daee
authored
Aug 15, 2016
by
Ivan Smirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always decay type param of npy_format_descriptor
parent
edbd4cb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
include/pybind11/numpy.h
+4
-4
No files found.
include/pybind11/numpy.h
View file @
67b3daee
...
...
@@ -29,8 +29,6 @@ NAMESPACE_BEGIN(pybind11)
namespace
detail
{
template
<
typename
type
,
typename
SFINAE
=
void
>
struct
npy_format_descriptor
{
};
template
<
typename
type
>
struct
is_pod_struct
;
template
<
typename
T
>
using
decay_cv_ref
=
typename
std
::
remove_cv
<
typename
std
::
remove_reference
<
T
>::
type
>::
type
;
struct
npy_api
{
enum
constants
{
...
...
@@ -148,7 +146,7 @@ public:
}
template
<
typename
T
>
static
dtype
of
()
{
return
detail
::
npy_format_descriptor
<
T
>::
dtype
();
return
detail
::
npy_format_descriptor
<
typename
std
::
remove_cv
<
T
>::
type
>::
dtype
();
}
size_t
itemsize
()
const
{
...
...
@@ -306,7 +304,9 @@ public:
template
<
typename
T
>
struct
format_descriptor
<
T
,
typename
std
::
enable_if
<
detail
::
is_pod_struct
<
T
>::
value
>::
type
>
{
static
std
::
string
format
()
{
return
detail
::
npy_format_descriptor
<
T
>::
format
();
}
static
std
::
string
format
()
{
return
detail
::
npy_format_descriptor
<
typename
std
::
remove_cv
<
T
>::
type
>::
format
();
}
};
template
<
size_t
N
>
struct
format_descriptor
<
char
[
N
]
>
{
...
...
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