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
329d9833
Commit
329d9833
authored
Feb 14, 2017
by
Dean Moldovan
Committed by
Wenzel Jakob
Feb 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Template array constructor (#582)"
This reverts commit
bee8827a
.
parent
11a337f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
4 deletions
+3
-4
include/pybind11/numpy.h
+3
-4
No files found.
include/pybind11/numpy.h
View file @
329d9833
...
...
@@ -337,9 +337,8 @@ public:
array
()
:
array
(
0
,
static_cast
<
const
double
*>
(
nullptr
))
{}
template
<
typename
Shape
,
typename
Strides
>
array
(
const
pybind11
::
dtype
&
dt
,
const
Shape
&
shape
,
const
Strides
&
strides
,
const
void
*
ptr
=
nullptr
,
array
(
const
pybind11
::
dtype
&
dt
,
const
std
::
vector
<
size_t
>
&
shape
,
const
std
::
vector
<
size_t
>
&
strides
,
const
void
*
ptr
=
nullptr
,
handle
base
=
handle
())
{
auto
&
api
=
detail
::
npy_api
::
get
();
auto
ndim
=
shape
.
size
();
...
...
@@ -537,7 +536,7 @@ protected:
throw
std
::
runtime_error
(
"array is not writeable"
);
}
template
<
typename
Shape
>
static
std
::
vector
<
size_t
>
default_strides
(
const
Shape
&
shape
,
size_t
itemsize
)
{
static
std
::
vector
<
size_t
>
default_strides
(
const
std
::
vector
<
size_t
>
&
shape
,
size_t
itemsize
)
{
auto
ndim
=
shape
.
size
();
std
::
vector
<
size_t
>
strides
(
ndim
);
if
(
ndim
)
{
...
...
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