Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
nifty_gridder
Commits
8549edf4
Commit
8549edf4
authored
Jul 09, 2019
by
Martin Reinecke
Browse files
add some neat stuff I just learned about
parent
16135c1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
nifty_gridder.cc
View file @
8549edf4
...
@@ -171,7 +171,7 @@ void checkArray(const py::array &arr, const char *aname,
...
@@ -171,7 +171,7 @@ void checkArray(const py::array &arr, const char *aname,
template
<
typename
T
>
pyarr
<
T
>
provideArray
(
py
::
object
&
in
,
template
<
typename
T
>
pyarr
<
T
>
provideArray
(
py
::
object
&
in
,
const
vector
<
size_t
>
&
shape
)
const
vector
<
size_t
>
&
shape
)
{
{
if
(
in
.
is
(
N
one
))
if
(
in
.
is
_n
one
(
))
{
{
auto
tmp_
=
makeArray
<
T
>
(
shape
);
auto
tmp_
=
makeArray
<
T
>
(
shape
);
size_t
sz
=
size_t
(
tmp_
.
size
());
size_t
sz
=
size_t
(
tmp_
.
size
());
...
@@ -188,7 +188,7 @@ template<typename T> pyarr<T> provideArray(py::object &in,
...
@@ -188,7 +188,7 @@ template<typename T> pyarr<T> provideArray(py::object &in,
template
<
typename
T
>
pyarr_c
<
T
>
provideCArray
(
py
::
object
&
in
,
template
<
typename
T
>
pyarr_c
<
T
>
provideCArray
(
py
::
object
&
in
,
const
vector
<
size_t
>
&
shape
)
const
vector
<
size_t
>
&
shape
)
{
{
if
(
in
.
is
(
N
one
))
if
(
in
.
is
_n
one
(
))
{
{
auto
tmp_
=
makeArray
<
T
>
(
shape
);
auto
tmp_
=
makeArray
<
T
>
(
shape
);
size_t
sz
=
size_t
(
tmp_
.
size
());
size_t
sz
=
size_t
(
tmp_
.
size
());
...
...
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